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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | autologout-consolidate_prevent_login_hook-1989798-7389532.patch | 5.79 KB | johnennew |
| #1 | autologout-consolidate_prevent_login_hook-1989798.patch | 2.77 KB | johnennew |
Comments
Comment #1
johnennew commentedPlease 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.
Comment #2
johnennew commentedSwitching to needs review.
Comment #3
johnennew commentedOK, another patch for review. This one moves the role check on the user into the hook as well.
Comment #4
johnennew commentedI've applied the patch in #3 to 7.x-4.x branch