autologout init runs on all page requests and has a few pieces of logic within it to prevent the inclusion of the JS code and prevent the running of the no JS fallback.

1. This should be called via a hook so that any module can prevent autologout from logging you out e.g. hook_autologout_prevent().
2. When autologout is prevented, the $_SESSION['autologout_last'] variable should be unset. If the current page has no timelimit, the next page should not then log you out when you load it.
3. To fix - http://drupal.org/node/1043928 - the init function should not run on the ajax callbacks from the JS. This can be included in the hook_autologout_prevent implementation for the autologout module.

Patch to follow.

Comments

johnennew’s picture

Please find a patch attached to address the issues reported for review and comment. It includes an autologout.api.php file to describe the new hook.

johnennew’s picture

Status: Active » Needs review

Switching to needs review.

johnennew’s picture

OK, another patch for review. This one moves the role check on the user into the hook as well.

johnennew’s picture

Status: Needs review » Fixed

I've applied the patch in #3 to 7.x-4.x branch

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit d587b2c on 7.x-4.x, 8.x-1.x by ceng:
    Issue #1990308: Added fixes for #1114846 (display a message after auto...