[Catalyst] Preventing simultaneous logins
jon at jrock.us
Wed Jul 23 21:12:15 BST 2008
* On Wed, Jul 23 2008, Daniel McBrearty wrote:
> What I'd like to do is check if this user is already logged in at some
> other computer, and deny access if so.
I would probably store sessions in the database, and then store the
session ID in the user table at login time (current_session) or
something. Then when they log in again, you can join in the session
row, check the expiration time in that row, and then allow/deny the
login. You can also use that opportunity to delete the session from the
database so that the other machine no longer has a valid session.
I don't think the file-based session stores provide this much
flexibility, but you could probably hack something similar if you really
print just => another => perl => hacker => if $,=$"
More information about the Catalyst