Session destroy |
[eluser]myjeep_2003[/eluser]
I am using mysql table to store session and trying to delete session (logout function) It is not killing the sessions... what is wrong...? function logout() { $this->delete_autologin(); // See http://ellislab.com/forums/viewreply/662369/ $this->ci->session->set_userdata(array('user_id' => '', 'username' => '', 'status' => '')); $this->ci->session->sess_destroy(); }
[eluser]danielpetrie[/eluser]
*removed* didn't see you used tankAuth.. have no experience with that, sorry.
[eluser]myjeep_2003[/eluser]
I am not sure what are you referring to by *removed*..IS there a technique to be used if one uses ci sessions stored in table?
[eluser]danielpetrie[/eluser]
[quote author="myjeep_2003" date="1271207154"]I am not sure what are you referring to by *removed*..IS there a technique to be used if one uses ci sessions stored in table?[/quote] I deleted my post because I realized my solution wouldn't work because you were using tankAuth.
[eluser]myjeep_2003[/eluser]
My logout function looks like this,,,, but it does not work... Since I am using table to store the session data, do I need to delete table records ..? just a thought.. function logout() { $this->delete_autologin(); // Remove token from the session $this->ci->session->unset_userdata('user_id'); $this->ci->session->sess_destroy(); } |
Welcome Guest, Not a member yet? Register Sign In |