application/controllers/admin/Login.php
// Function to handle the user clicking the reset password link from their email
Function to handle the user clicking the reset password link from their email
Function to handle the user clicking the reset password link from their email
public function resetPassword($code) {
        $user = $this->ion_auth->forgotten_password_check($code);
        if($user) {
            $data = array();
            $data['user_id'] = $user->id;
            $data['csrf'] = $this->getNonce();
            $data['code'] = $code;
            $data['min_password_length'] = $this->config->item('min_password_length', 'ion_auth');
            $data['max_password_length'] = $this->config->item('max_password_length', 'ion_auth');
            $this->template->display($data, 'admin/reset_password.tpl');            
        } else {
            $this->session->set_flashdata('message', $this->ion_auth->errors());
            redirect("/admin/login/reset");
        }
    }
public function resetPassword ( $ code ) { $ user = $ this -> ion_auth -> forgotten_password_check ( $ code ) ; if ( $ user ) { $ data = array ( ) ; $ data [ 'user_id' ] = $ user -> id ; $ data [ 'csrf' ] = $ this -> getNonce ( ) ; $ data [ 'code' ] = $ code ; $ data [ 'min_password_length' ] = $ this -> config -> item ( 'min_password_length' , 'ion_auth' ) ; $ data [ 'max_password_length' ] = $ this -> config -> item ( 'max_password_length' , 'ion_auth' ) ; $ this -> template -> display ( $ data , 'admin/reset_password.tpl' ) ; } else { $ this -> session -> set_flashdata ( 'message' , $ this -> ion_auth -> errors ( ) ) ; redirect ( " /admin/login/reset " ) ; } }
Function to handle the user clicking the reset password link from their email
Function to handle the user clicking the reset password link from their email