After the user logs in, I set the variable is_logged_in=true
, but in some other controller how can I check is_logged_in
is true in codeigniter?
Here is my login code:
public login_con extends CI_Controller
{
public function login()
{
is_logged_in=true;
}
}
I want to check this is_logged_in
in another controller so how can i write code for that?