Summary: Automatically logout inactive users
Version: 2007-07-27
Prerequisites: pmwiki-2.2.0-beta1
Maintainer: cda (other recipes)
Categories: Security

Questions answered by this recipe

  • How to force users to login again if they remained inactive too long ?


To use this recipe, download InactivityTimeout.phpΔ, copy it into the cookbook/ directory, and add the following line to a local customization file:

    $InactivityTimeout = <your value in seconds>;  

The default timeout is 600 seconds.

PHP options (usually set in php.ini) like 'session.gc_maxlifetime' can cause the sessions to expire before $InactivityTimeout seconds. This recipe only makes sure no authenticated user will remain authenticated longer than $InactivityTimeout, not that he will allways remain authenticated $InactivityTimeout seconds.


See Also



See discussion at InactivityTimeout-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.