08-24-2017, 05:47 PM
If you record a user's session in the database on login, each time a user loads a page from any location you can check if the current session matches the one in the database. Since each login from other browsers or devices will create a new session ID each time, the most recent login will be the one recorded in the database and all other logins will basically be expired. In your check, if the sessions don't match you can log them out and redirect them to login (perhaps with a message that they have since logged in elsewhere).