Forum: Ruby on Rails Different sessions for different users

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.
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 unknown (Guest)
on 2007-01-20 23:20
(Received via mailing list)

In my application, normal users are signed in until they manually log
out.  We also have admin users, who are also logged in until the
manually log out.

I do this by setting the session expiration date to 2038 or something
far in the future.

How can I change the session expiration date only for the admin users?
I want the admin users to be logged out whenever they close their

70225136eacd3d870f64e03bff678655?d=identicon&s=25 Russell Norris (Guest)
on 2007-01-21 16:15
(Received via mailing list)
When the user logs in, just check if they're an admin and set the
accordingly. :)

38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 unknown (Guest)
on 2007-01-24 23:09
(Received via mailing list)
How would you do that?
538fa89682589ea480d524756fa0841d?d=identicon&s=25 Peter Ertl (Guest)
on 2007-01-25 15:52
(Received via mailing list)
if admin + expired then
  kill session + go login

2007/1/24, <>:
This topic is locked and can not be replied to.