Closed (duplicate)
Project:
Automated Logout
Version:
6.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2011 at 19:57 UTC
Updated:
10 May 2013 at 14:08 UTC
I deselected enforcement for one of my roles, but the site is still logging out users with that role.
Comments
Comment #1
bgbedard commentedI have figured this out. I thought it meant that if you deselect a Role then someone with that Role as one of their roles would be exempt from the auto logout, but rather it means that if someone has any of the roles selected then they would be forced to logout.
Comment #2
jack.r.abbit commentedNot sure this should be considered a bug... or just a bad implementation. At a minimum, the UI does not sufficiently explain what these check boxes do. I think that if you deselect a role then users with that role should not be logged out regardless of what other roles they have.
However, with the current code it does not matter what roles you deselect, as long as you have "authenticated user" checked, everyone will get logged out since no one can have any of the other roles if they are not also an "authenticated user". Not to mention, if a user is not an "authenticated user" then we don't need to log them out any way. We have the situation where we have an "administrator" role (using another module that grants nearly all admin rights to this role) and we would like users that we have with this role to be exempt from being logged out. But even with that role deselected, they are getting logged out because they are also have the "authenticated user" role.
I've taken the function that checks if the user should have auto logout enforced based on role and reversed all the Boolean logic.
So instead of looping through the list of roles and immediately returning TRUE when it finds a role marked as TRUE like this:
It now loops through the list of roles and returns a FALSE as soon as it finds a roll marked as FALSE like this:
Comment #3
roball commentedThis issue is related to the bug reported at #992816: Autologout is active for disabled roles.
Comment #4
johnennew commentedMarking as duplicate of http://drupal.org/node/1700706
This issue should be fixed by the pending backport on this issue