Jump to content

Unique user authentification


tudoroprea

Recommended Posts

Hello!

I need an idea of how to make a user login from only one computer. If he tries to login from a second computer while he is logged into his account from the first computer, the user will be automatically logged out from the first computer and logged in on the second one. It is similar to the Yahoo Mail and Yahoo Messenger and would really appreciate an idea of how to make this the best way.

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/68708-unique-user-authentification/
Share on other sites

basic idea would be have a table "sessions" when the user logs in, the login script looks for an entry in the sessions table and removes them(it), then it creates one, with the session_id being used.. now everytime you check the user is logged in you can check tha the current users session id is the same as the one in the database.. if not then clear then session_destory().

 

please note thats just a draft

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.