Hi all, I have a login system and want to allow only one username to be logged-in at one time, so basically the user can’t log on to two computers at the same time. I’m doing this by updating my table when the user logs in and then updating it again when they log out - like this all is working perfectly.
Problem is when the user closes the browser without logging out, obviously the update database query isn’t ran and therefore the user is locked out of the system.
If they try to log in more than half an hour (or an hour, or …) after their last activity of the previous login, assume they logged out of that previous login.
Hey there, I’ve created a POS system for my work. Each employee has their own username, etc for writing orders. I’ve been asked if I can make it so that a user can only be logged in on once machine - I did this manage to do this but the problem is if the user just shuts their browser then the user is effectively locked out of the system. Just trying to figure out a workaround for this?
A better way than locking the account for e.g. half an hour (it has to be locked at least as long until the old session expired anyway) would be to show a message to the user that there’s still an active session.
You could then give an option to cancel the old session to log in from the other PC or to cancel the login process.
This way a user can be logged in on one PC but still switch PCs very easily without having to wait until the old session expires.
No employer would like to see his employees sitting in front of an unusable POS system waiting that they can log in again