What's the best module for a session timeout?

I simply want users to be automatically timed out after a period of inactivity.

The Automated Logout module looked like it could to the trick, but it seems like it does a lot more too. Also, I am using Drupal 7 and it's still in dev.

  • 2
    Autologout now has a proper drupal 7 release and works as advertise.
    – rooby
    Commented Aug 8, 2013 at 11:02

1 Answer 1


You have two options in the settings file that should allow you to configure the session timeout however you wish, session.gc_maxlifetime & session.cookie_lifetime.

 * Set session lifetime (in seconds), i.e. the time from the user's last visit
 * to the active session may be deleted by the session garbage collector. When
 * a session is deleted, authenticated users are logged out, and the contents
 * of the user's $_SESSION variable is discarded.
ini_set('session.gc_maxlifetime', 200000);

  * Set session cookie lifetime (in seconds), i.e. the time from the session is
  * created to the cookie expires, i.e. when the browser is expected to discard
  * the cookie. The value 0 means "until the browser is closed".
ini_set('session.cookie_lifetime', 2000000);

Not the answer you're looking for? Browse other questions tagged or ask your own question.