Welcome Guest, Not a member yet? Register   Sign In
Session destroy
#1

[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();


}
#2

[eluser]danielpetrie[/eluser]
*removed*

didn't see you used tankAuth.. have no experience with that, sorry.
#3

[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?
#4

[eluser]bobbob[/eluser]
This doesn't work?

$this->session->sess_destroy();
#5

[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.
#6

[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();

}




Theme © iAndrew 2016 - Forum software by © MyBB