Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function index()
- {
- $this->form_validation->set_rules('login_email', 'E-MAIL',
- 'required|trim');
- $this->form_validation->set_rules('login_senha', 'SENHA',
- 'required|trim');
- if ($this->form_validation->run() == TRUE) {
- $identity = $this->input->post('login_email');
- $password = $this->input->post('login_senha');
- $remember = TRUE; // remember the user
- if ($this->ion_auth->login($identity, $password, $remember)) {
- redirect('admin', 'refresh');
- } else {
- set_msg('msgerro', 'Dados incorretos! Tente novamente.', 'erro');
- redirect('login', 'refresh');
- }
- } else {
- $this->load->view('includes/head');
- $this->load->view('login');
- $this->load->view('includes/footer');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement