Welcome Guest, Not a member yet? Register   Sign In
Delete session from DB when closing browser
#1

[eluser]cmh24[/eluser]
Hi everybody,

I want to avoid multiple logins at the same time (meaning not 2 computers can be logged in with the same credentials).

I managed to insert the user_id in the ci_session table with the help of a small overriding of sess_write. So far login and logout are working, everytime the user_id field gets updated (either the specific user_id or NULL).

Now when somebody logs in, I want to query the ci_session table for the specific user_id and then proceed or not.

But when the user just closed the browser without logging out before, the session entry stays in the table and this user can not log in again.

I use 'sess_expire_on_close' and set it to TRUE.

I hope anybody has an idea.

Best wishes!
Max


Messages In This Thread
Delete session from DB when closing browser - by El Forum - 05-24-2012, 05:32 PM
Delete session from DB when closing browser - by El Forum - 05-24-2012, 06:22 PM
Delete session from DB when closing browser - by El Forum - 05-25-2012, 02:11 AM
Delete session from DB when closing browser - by El Forum - 05-25-2012, 09:24 AM
Delete session from DB when closing browser - by El Forum - 05-28-2012, 12:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB