Forum: Ruby on Rails prevent double logins

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
98ce675339d7e7c8269349943d6a0823?d=identicon&s=25 andrewfromfly (Guest)
on 2007-01-08 19:12
(Received via mailing list)
If a user logs in from firefox, and then opens a copy of internet
explorer and logs in there too, how can I log them out of the firefox

i.e. never allow the same user to be logged in in more than 1 place at
a time.

I'd have to know the session id of the first session and somehow get
into memcached's hash and remove that session.

So I guess upon login I'll grap the session id (from request.cookie?)
and update the user's database record with the session id.  Then upon
another login construct the same key memcached uses for the session (is
it just the session id?  or some prefix/suffix added?) and call

Any thoughts?  Thanks.
This topic is locked and can not be replied to.