Hi!
I was wondering if it is possible to prevent concurrent sessions from one username? I want to prevent users from being able to connect to my system with the same login from 2 different machines at the same time.
I am stuck on this one and I have no idea how to do it. All suggestions are welcome
😉
you could track it in the database, when the user gets their and signs in, set their status to, let's say 1, then you can check in the database if the status is 1, if it is, don't let the other person come in, you could also do this via a session ID
Thanks for the quick reply 🙂
I like your suggestion, but I can see one problem: what happens if the user does not log out, and needs to log in again shortly after, before the session expires? The user would not be able to log in. Then again, that should be a weighty argument for that the users use the logout button and not just close the browser when they are done. I will try this.
Cheers,
John
instead of storing a 1 in the db, you could store the ipaddress for that user.
Does not work if the user is using a proxy.
which is why i suggested using using say, 1 for logged in and 0 for not, many people are on proxies