防止多个用户同时登录同一帐户 [英] Preventing multiple Users from logging into the same account at the same time

查看:95
本文介绍了防止多个用户同时登录同一帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


用户通常拥有用户名和密码,并且可以使用相同的详细信息一次登录到多个maches。我想要做的是将它们限制在一台机器上,如果它们已经在一台机器上已经LOGGED-ON,任何尝试再次登录到另一台机器就会被踢出或者弹出一个告诉他们已经登录到另一台机器机器。


所有帮助将不胜感激。

Thanx

Hi all,

users usually have usernames and passwords, and can log in to many maches at once withe same details. What I want to do is restrict them to only one machine if they have already LOGGED-ON on one machine, any attempt to LOG-IN again to another they get kicked out or have a Pop up telling them they already LOGGED-ON to another machine.

All help will be greatly appreciated.
Thanx

推荐答案


大家好,


用户通常拥有用户名和密码,并且可以使用相同的详细信息一次登录到多个maches。我想要做的是将它们限制在一台机器上,如果它们已经在一台机器上已经LOGGED-ON,任何尝试再次登录到另一台机器就会被踢出或者弹出一个告诉他们已经登录到另一台机器机器。


所有帮助将不胜感激。

Thanx
Hi all,

users usually have usernames and passwords, and can log in to many maches at once withe same details. What I want to do is restrict them to only one machine if they have already LOGGED-ON on one machine, any attempt to LOG-IN again to another they get kicked out or have a Pop up telling them they already LOGGED-ON to another machine.

All help will be greatly appreciated.
Thanx



Hi mankolele,


我这样做是针对用户凭据的额外记录。因此,当用户登录时,您更新记录以显示他们已登录。


此外,当用户尝试登录时,请检查此字段以及他们是否已登录告诉他们这个。


除此之外,在一段时间不活动之后值得让会话超时。这意味着如果他们关闭浏览器但没有注销,他们最终会自动注销。


当用户注销或会话被杀时,你将记录设置为表明他们没有登录。


通过这种方式,您可以确保他们只登录一次。由于数据存储在服务器上,它也适用于机器和平台。


希望这有助于

干杯

nathj


PS这让我有了改进我自己网站的想法 - 谢谢!

Hi mankolele,

The way I would do this is an extra record against the user credentials. So when a user logs in you update the record to show that they are logged in.

Also when a user tried to log in you check this field and if they are already logged in you tell them this.

In addition to this it would be worth having the session timeout after a period of inactivity. this would mean that if they close the browser but don''t log out they are eventually logged out automatically.

When a user logs out or the session is killed you set the record to show that they are not logged in.

In this way you can ensure that they only log in once. As the data is stored on the server it would work across machines and platforms as well.

Hope this helps
Cheers
nathj

PS This has given me an idea to improve my own site - thanks!


我有一张桌子,我正在这样做但是我的block是所有用户都被视为id 1,我最终无法确定谁是谁。
I have a table where I am doing that but my block is that all user are taken as id 1 where I end up not being able to identify who is who.



我有一张桌子我正在做的事情,但我的阻止是所有用户被视为id 1,我最终无法确定谁是谁。
I have a table where I am doing that but my block is that all user are taken as id 1 where I end up not being able to identify who is who.



你好mankolele,


表格中是否有任何东西可以无法识别给定用户 - 用户名或电子邮件地址例?这可以构成您查询的基础。


对于良好的数据设计,应该有人在任何时候唯一地识别给定用户。


干杯

nathj

Hi mankolele,

Is there anything within in the table can uniqwuely identify a given user - username or email address for example? This could then form the basis of your query.

For good data design there should be someone of uniquely identifying a given user at any time.

Cheers
nathj


这篇关于防止多个用户同时登录同一帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆