and in the constructor of the library, after check remembered, I put this code
Code:
//auto-login the user if they are remembered
if (!$this->logged_in() && get_cookie('identity') && get_cookie('remember_code'))
{
$this->ci->ion_auth_model->login_remembered_user();
}
//check if the data in the session is equal to database data
elseif($this->logged_in() && !$this->ci->ion_auth_model->check_session_validity())
{
//try to refresh the session data
if(! $this->ci->ion_auth_model->refresh_session_data()){
//oh, I can't update the session. Probably the user was deactivated
$this->logout();
}
}
What do you think?
As I said, I don't have access to github, but I'll try to get this friday at home...