my first ever post here.
I've built out a login system (with password validation, strengths, checks to the DB, hashing, etc) and am nearly complete. I've got it to where I can prevent duplicate logins of the same user, checking against two fields in my database that are created during the login process: one is a randomly generated token in 'token' and the other is 'isSignedIn' either a 0 and 1. Currently, it prevents duplicate logging in for the same user and will also boot the person off on the next page action.
My next goal is to prevent two different users from logging into the same web browser on the same computer at the same time. I haven't found a solid answer for this after hours of searching.
Here is the issue I am having: during my testing, having logged in with multiple users in the same browser:
I login with three different users into my portal; all three have
their 'token' and 'isSignedIn' written to the DBI log off with one user and that user's token/isSignedIn value is
deleted/ altered, respectively- When I log out the other two users, the values for their 'token' and 'isSignedIn' remain in the database even though they are logged out successfully.
I can't figure out why logging out the one user prevents the other two from having their 'token' and 'isSignedIn' deleted upon sign out. It works for the first user, no problem. I assume there is some sort of session overlap that kills the other two. I can't tell clients to simply "only one person at a time on one computer on one browser" so I need some help.
I'd like to limit only one user on one browser at a time or prevent a second/ third/ fourth user from logging in the same browser.
Any help would be greatly appreciated!
Thank you.
Database Image

Logout Processor

$_SESSION['email'], and load that in the first tab (I assume you're logging in through multiple tabs?) after you've logged in on the second one. - Greg Schmidt