Page 1 of 1

Preventing multiple logins useing same username

Posted: Wed Jul 17, 2002 1:51 pm
by sasamitrovic
Hi,

I am new to this forum and I'm not sure whether this topic has been previously discussed, so I apologise if it has. Does anyone have any ideas how to efficently prevent a user to log in with his username more than once at a time. I am using session control and my first idea was to maintain a database of all the users curerently logged in and not to let a user log in if his username is in the database. But, what happens when a logged-in user simply shuts down his browser without logging out previously?

Posted: Wed Jul 17, 2002 2:25 pm
by jason
Well, in your instance, we do this. If the users goes to log back in, and a session still exists for that users, we delete that session from the database first, and then add that users new session information.

This means essentially, that if I log in a second time, I automatically log out my first instance.

Posted: Wed Jul 17, 2002 10:30 pm
by cheatboy00
... so if i was to log in on this particular system and shut down my browser will it still count you as loged in... hmm... i might use this way.. cookies are annoying