The following line of code in _autologout_get_user_timeout() will ALWAYS resolve to FALSE:

if (!variable_get('autologout_user_' . $userid, $default_timeout)) {
...
}

In the case that a user does have a user-specific timeout set of 60, then this will be if(!60){ which is FLASE. If the user does not have a user-specific timeout set, (and we assume default_timeout is 1800) then this will be if(!1800){ which is also false. This codes should be:

if (!variable_get('autologout_user_' . $userid, 0)) {
...
}

The attached patch solves this issue and fixes a few more coding standards issues

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bleen’s picture

FileSize
2.2 KB

Now that we are actually getting into that if statement, we need to make sure that we bail out of the _autologout_get_user_timeout function for anon users otherwise you can get error when you are automatically logged out.

This patch adds that bailout

johnennew’s picture

Status: Needs review » Closed (duplicate)

Hi all,

This has been fixed by:
http://drupal.org/node/1700706

Marking this as a duplicate