Welcome Guest, Not a member yet? Register   Sign In
destroy session then set flash data
#1

[eluser]bigtimslim[/eluser]
I'm playing around with an auth library and have been using flash data for messages like 'you have logged in', etc.

Now I get to the logout function and I want to set flash data saying the user has successfully logged out after the session is destroyed. When I test this, all of the session data is preserved. controller just looks life this:
[/code]
function logout()
{
$this->auth->logout();
$this->session->set_flashdata('msg', 'You have logged out.');
redirect('home');
}
[code]


I noticed that the user guide says sess_destroy shouuld be the last function called. Any ideas?


Messages In This Thread
destroy session then set flash data - by El Forum - 12-12-2008, 07:59 AM
destroy session then set flash data - by El Forum - 12-13-2008, 02:14 PM
destroy session then set flash data - by El Forum - 12-14-2008, 05:51 PM
destroy session then set flash data - by El Forum - 12-20-2008, 06:06 PM
destroy session then set flash data - by El Forum - 06-03-2010, 07:44 AM
destroy session then set flash data - by El Forum - 06-03-2010, 08:16 AM
destroy session then set flash data - by El Forum - 06-03-2010, 01:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB