application/controllers/admin/Login.php
// Process a login request from the form
Process a login request from the form
Process a login request from the form
public function login() {
        $email = $this->input->post('email');
        $password = $this->input->post('password');
        $remember = (bool)$this->input->post('remember');
        if ($this->ion_auth->login($email, $password, $remember)) {
            redirect("/admin");
        } else {
            $this->session->set_flashdata('message', $this->ion_auth->errors());
            redirect("/login");
        }
    }
public function login ( ) { $ email = $ this -> input -> post ( 'email' ) ; $ password = $ this -> input -> post ( 'password' ) ; $ remember = ( bool ) $ this -> input -> post ( 'remember' ) ; if ( $ this -> ion_auth -> login ( $ email , $ password , $ remember ) ) { redirect ( " /admin " ) ; } else { $ this -> session -> set_flashdata ( 'message' , $ this -> ion_auth -> errors ( ) ) ; redirect ( " /login " ) ; } }
Process a login request from the form
Process a login request from the form