tudoroprea Posted September 10, 2007 Share Posted September 10, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/68708-unique-user-authentification/ Share on other sites More sharing options...
MadTechie Posted September 10, 2007 Share Posted September 10, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/68708-unique-user-authentification/#findComment-345383 Share on other sites More sharing options...
hackerkts Posted September 10, 2007 Share Posted September 10, 2007 Maybe you can try create a user online table and insert their session id and check for the session id.. Just an idea.. Quote Link to comment https://forums.phpfreaks.com/topic/68708-unique-user-authentification/#findComment-345384 Share on other sites More sharing options...
tudoroprea Posted September 10, 2007 Author Share Posted September 10, 2007 thanks i will try that Quote Link to comment https://forums.phpfreaks.com/topic/68708-unique-user-authentification/#findComment-345395 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.