Welcome Guest, Not a member yet? Register   Sign In
Saving Session Data to a Database
#6

[eluser]cideveloper[/eluser]
Code:
$this->session->sess_destroy();

Does delete the row from the DB.

So when the user logs out you can just call $this->session->sess_destroy(); in your controller. Right at the end. Just remember one thing. If you log the user out and destroy his session and then redirect them to another page and have sessions auto-loading, another session will be created.


Messages In This Thread
Saving Session Data to a Database - by El Forum - 01-09-2011, 03:16 PM
Saving Session Data to a Database - by El Forum - 01-09-2011, 03:36 PM
Saving Session Data to a Database - by El Forum - 01-09-2011, 03:49 PM
Saving Session Data to a Database - by El Forum - 01-09-2011, 03:53 PM
Saving Session Data to a Database - by El Forum - 01-09-2011, 03:59 PM
Saving Session Data to a Database - by El Forum - 01-09-2011, 06:06 PM
Saving Session Data to a Database - by El Forum - 01-09-2011, 08:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB