You are here

function _autologout_logout_role in Automated Logout 6.4

Same name and namespace in other branches
  1. 7.4 autologout.module \_autologout_logout_role()

Helper to determine if a given user should be autologged out.

1 call to _autologout_logout_role()
autologout_cron in ./autologout.module
Implements hook_cron().

File

./autologout.module, line 685
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;
}