#38 ✓resolved
James Coleman

logout_on_timeout not functioning as expected

Reported by James Coleman | February 10th, 2009 @ 02:58 PM

I have logout_on_timeout true in my model and the setting for the length of a session before timeout. This works correctly, and users are logged out after the specified time.
However, in the documentation for logout_on_timeout (Authlogic::Session::Config::ClassMethods) it states: "Lastly, UserSession.find will still return a object is the session is stale, but you will not get a record. This allows you to determine if the user needs to log back in because their session went stale, or because they just aren‘t logged in. Just call current_user_session.stale? as your flag."

So I have tried using current_user_session.stale? in several different places (I need to clear some extra data out of the session when a user logs out or is logged out) but I always get an error the current_user_session is nil when used right after UserSession.find on an just auto-logged out user.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket