Welcome Guest, Not a member yet? Register   Sign In
Logout and flashdata
#6

[eluser]WanWizard[/eluser]
My point exactly.

Destroying a session is (almost) never a good idea. Use a properly defined structure, and delete only that.

For ExiteCMS, the session contains a variable called 'auth', which is an array with all kind of authentication related information. If this variable exists when the user requests a page, the user session is restored. If not, a guest session is started. When a user logs out, I simply delete the 'auth' variable from the session.
All other session variables are untouched, and survive login/logout actions (for example user preferences, selection or filter criteria, etc).


Messages In This Thread
Logout and flashdata - by El Forum - 10-08-2010, 07:02 AM
Logout and flashdata - by El Forum - 10-08-2010, 07:20 AM
Logout and flashdata - by El Forum - 10-08-2010, 07:22 AM
Logout and flashdata - by El Forum - 10-08-2010, 07:46 AM
Logout and flashdata - by El Forum - 10-08-2010, 07:58 AM
Logout and flashdata - by El Forum - 10-08-2010, 08:08 AM
Logout and flashdata - by El Forum - 10-08-2010, 08:25 AM
Logout and flashdata - by El Forum - 10-08-2010, 09:06 AM
Logout and flashdata - by El Forum - 10-08-2010, 09:21 AM
Logout and flashdata - by El Forum - 10-08-2010, 09:25 AM
Logout and flashdata - by El Forum - 10-08-2010, 11:05 AM
Logout and flashdata - by El Forum - 10-08-2010, 11:05 AM
Logout and flashdata - by El Forum - 10-08-2010, 11:09 AM
Logout and flashdata - by El Forum - 10-08-2010, 02:25 PM
Logout and flashdata - by El Forum - 10-08-2010, 04:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB