#76 New plugin: Idle session timeout

open
nobody
None
5
2004-10-01
2004-10-01
Awais Ahmad
No

This simple plugin ensures a user remains logged in
unless they remain idle for a predefined amount of
time. Active sessions will remain open forever.

Writes a time stamp to the session file on each
request, hence updating the mtime.

From the README:

If you use PHP's internal garbage collector, you cannot
be exact with the idle timeout time, idle users will be
logged out some time after session.gc_maxlifetime. For
example, setting session.gc_maxlifetime = 60, would
mean users will be logged out sometime after 60 minutes
of inactivity.

If you would like the timeout to be more accurate,
disable PHP's internal garbage collection and use a
custom cronjob to cleanup session files based on mtime
instead.

Also, you might want to consider changing the "You must
be logged in to access this page" messages to "Your
session has timed out" or something similar for
consistency.

Awais

Discussion

  • Awais Ahmad
    Awais Ahmad
    2004-10-01

    Idle timeout plugin