How to keep session data using Codeigniter and Tank Auth How to keep session data using Codeigniter and Tank Auth codeigniter codeigniter

How to keep session data using Codeigniter and Tank Auth


As far as the most recent code looks like, the only place the hole session is deleted is in the logout() function, Tank_auth.php Line 118:https://github.com/ilkon/Tank-Auth/blob/master/application/libraries/Tank_auth.php#L118

The example usage of Tank Auth uses logout() in activate() and reset_email() - check your code for those methods. You could also change the Tank Auth logout function to something like this:

function logout($keep_session = false){    $this->delete_autologin();    // See http://codeigniter.com/forums/viewreply/662369/ as the reason for the next line    $this->ci->session->set_userdata(array('user_id' => '', 'username' => '', 'status' => ''));    if(!$keep_session)        $this->ci->session->sess_destroy();}

... and the use it like this: $this->tankauth->logout(true);