开发者

how to control the user relogin

开发者 https://www.devze.com 2023-01-25 22:42 出处:网络
If one user have login in one computer or a browser,then he login in another computer/browser again,so the former login should be marked as开发者_如何转开发 invalid,is there any way to implement this?

If one user have login in one computer or a browser,then he login in another computer/browser again,so the former login should be marked as开发者_如何转开发 invalid,is there any way to implement this?


One way it to set a cookie with a session id when they log in, and record the latest session id somewhere server-side (like a database) keyed by that user id. On any website access, verify it's the latest session for that user.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号