function _autologout_logout_role in Automated Logout 7.4
Same name and namespace in other branches
- 6.4 autologout.module \_autologout_logout_role()
Helper to determine if a given user should be autologged out.
File
- ./
autologout.module, line 681 - Used to automagically log out a user after a preset time.
Code
function _autologout_logout_role($user) {
if (variable_get('autologout_role_logout', FALSE)) {
foreach ($user->roles as $key => $role) {
if (variable_get('autologout_role_' . $key, FALSE)) {
return TRUE;
}
}
}
return FALSE;
}