[UPHPU] Best way to prevent multiple logins from the same account.
phpninja
phpninja at gmail.com
Thu Apr 5 17:59:41 MDT 2007
Hello all, I have been hacking some code around to see if it is possible to
prevent multiple logins from the same account. That is, if username/password
is currently logged in, and someone opens another web browser and tries to
login with that same username/password it will then redirect them out,
saying that someone from your account is already currently logged in.
I thought the best way of doing this would be adding a logged_in field to my
users table and when they complete a successful login, set the field to yes.
And then update it the field appropriately if someone clicks "logout" it
would just set the field to no. My problem is when a user click the X
button, or hits alt + 4, I do not think javascript can pick that up right to
set the logged in status to no via xmlhttp. has anyone figured this out, or
is it not possible the way I am trying to do it? Thanks in advance.
phpninja
More information about the UPHPU
mailing list