I am getting this error when i try to login to my admin page where i ask it to verify the credentials
here are some snippets:
// Tank_Auth.php Line 71
$this->ci->session->set_userdata(array(
'is_admin' => (bool) $user->is_admin, // added
'user_id' => $user->id,
'username' => $user->username,
'status' => ($user->activated == 1) ? STATUS_ACTIVATED : STATUS_NOT_ACTIVATED,
));
function is_admin()
{
return $this->logged_in() && $this->ci->session->userdata('is_admin') === TRUE;
}
// controllers/auth.php Line 30
function login()
{
if ($this->tank_auth->is_admin()) {
redirect('admin');
} elseif ($this->tank_auth->is_logged_in()) {
redirect('user');
}
so i though if i added this to my login page it would verify that i am an admin:
public function index() {
if ($this->tank_auth->is_admin()) {
redirect('admin/dashboard');
} else {
$this->load->view('admin/vwLogin');
}
}
Can anybody help me with this please? i am really lost now on how to solve this.