views:

403

answers:

1

Hiya,

I'm looking to create a custom module which hooks into the Drupal timeout procedure. It needs to fire a quick ping to another server when a user times out - so that they are logged out of the systems on the second server too.

Thing is... I can't find any documentation about how Drupal manages it's timeout. What I have been able to find is all related to PHP.ini.

This leads me to wonder if it's possible to fire an event on timeout at all? Has anyone got experience with this?

Thanks, Hugh

+3  A: 

Can't believe no-one knew this?

In /sites/default/settings.php change

ini_set('session.cookie_lifetime', 2000000);

2000000 seconds is 23 days which seems a really stupid default timeout, so you can change it to something like:

3600 (1 hour) 10800 (3 hours) 86400 (1 day)

hfidgen