in function autologout_init() there the autologout.js file is included within the following if statement:

if ($user->uid && _autologout_logout_role($user)) {

However, if no roles are checked off in the config form (because you do not have "Role Timeout" checked) then the js file will never be included (and thus, the timeout doesnt work)

There should probably be some kind of check of variable_get('autologout_role_logout') in there as well, no?

Comments

bleen’s picture

Status: Active » Needs review
StatusFileSize
new1.95 KB

This fixes the issue

bleen’s picture

StatusFileSize
new1.81 KB

This is a reroll now that a couple of the other patches in the queue have been committed

johnennew’s picture

Hi,

I've gone a head and committed the attached patch which builds on #2.

In this new patch:

1. the default value is used if the global role timeout is not enabled as per #2
2. unchecked roles are not used and the user is reverted to the default value (unchecking a role would mean that what ever value was set for the role would still be used)
3. setting a value of 0 for any role is now allowed and this means that anyone with that role is never logged out via autologout.

johnennew’s picture

Version: 7.x-4.x-dev » 6.x-4.x-dev
Status: Needs review » Needs work

Setting to 6.x-4.x branch for backport

johnennew’s picture

Status: Needs work » Fixed
StatusFileSize
new14.95 KB

Applied attached patch as backport to 6.x-4.x branch

Status: Fixed » Closed (fixed)

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

  • Commit 0f0a4d0 on 7.x-4.x, 8.x-1.x by ceng:
    Issue #1700706 by ceng and bleen18: Fixes for autologout role logic -...