application/controllers/admin/Login.php
// Function to handle the user clicking on an account activation link
Function to handle the user clicking on an account activation link
Function to handle the user clicking on an account activation link
public function activateAccount($id, $code) {
        $activation = $this->ion_auth->activate($id, $code);
        if($activation) {
            $identity = $this->ion_auth->where('id', $id)->users()->row();
            $forgot = $this->ion_auth->forgotten_password($identity->{$this->config->item('identity', 'ion_auth')});
            $forgot['forgotten_password_code'] = urlencode($forgot['forgotten_password_code']);
            redirect("/reset_password/{$forgot['forgotten_password_code']}");
        } else {
            redirect("/");
        }
    }
public function activateAccount ( $ id , $ code ) { $ activation = $ this -> ion_auth -> activate ( $ id , $ code ) ; if ( $ activation ) { $ identity = $ this -> ion_auth -> where ( 'id' , $ id ) -> users ( ) -> row ( ) ; $ forgot = $ this -> ion_auth -> forgotten_password ( $ identity -> { $ this -> config -> item ( 'identity' , 'ion_auth' ) } ) ; $ forgot [ 'forgotten_password_code' ] = urlencode ( $ forgot [ 'forgotten_password_code' ] ) ; redirect ( " /reset_password/ { $ forgot [ 'forgotten_password_code' ] } " ) ; } else { redirect ( " / " ) ; } }
Function to handle the user clicking on an account activation link
Function to handle the user clicking on an account activation link