Question about logins and locking
| From: | James Colannino | Date: | Tue, 22 Jun 2010 21:29:17 +0000 |
| Subject: | Question about logins and locking | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306320@lists.php.net to get a copy of this message | ||
Hey everyone,
I have a question about logins. Let's say that I want to allow each
user account to login only once at a time. I would then need some kind
of locking mechanism to make sure that the same user can't login again
somewhere else until first logging off. What's a good way to achieve
this? I want to be able to handle situations in which the user closes
their browser without first logging off, where I would want to count
that as a logout.
Perhaps I could do some kind of periodic polling in Javascript, combined
with a query to the database that sets a value when the user logs in and
when the user logs out? I'm just looking for some conceptual ideas.
Thanks everyone!
James