Welcome Guest, Not a member yet? Register   Sign In
Do not regenerate session_id
#12

[eluser]gyo[/eluser]
Ok, maybe this is better...

Every time a user logs in you add a record in the "active_sessions" table (session_id, user_id, last_update), but first delete all the other records with the same user_id.

To keep an active user, you check if the "active_sessions" has a record with the current user's session_id.

If there was another user logged in, he will be logged out, since on the next page load the session will not be found in the "active_sessions" table anymore.

Think of it like: the new enters, the old is kicked.

Hope this helps! Smile


Messages In This Thread
Do not regenerate session_id - by El Forum - 09-17-2010, 05:37 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 06:44 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 06:56 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 07:15 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 07:40 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 07:40 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 08:01 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 08:20 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 08:49 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 09:49 AM
Do not regenerate session_id - by El Forum - 09-17-2010, 03:18 PM
Do not regenerate session_id - by El Forum - 09-20-2010, 04:07 AM
Do not regenerate session_id - by El Forum - 09-21-2010, 06:30 AM
Do not regenerate session_id - by El Forum - 09-24-2010, 04:50 AM
Do not regenerate session_id - by El Forum - 09-24-2010, 05:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB