You are here

function _autologout_user_in_by_user_role in Automated Logout 6.2

Same name and namespace in other branches
  1. 5 autologout.module \_autologout_user_in_by_user_role()
  2. 6 autologout.module \_autologout_user_in_by_user_role()
  3. 7.2 autologout.module \_autologout_user_in_by_user_role()
1 call to _autologout_user_in_by_user_role()
autologout_user in ./autologout.module
Implementation of hook_user().

File

./autologout.module, line 398
Used to automagically log out a user after a preset time, AjK May 2006

Code

function _autologout_user_in_by_user_role($account = NULL) {
  global $user;
  if ($account == NULL) {
    $account = $user;
  }
  foreach (user_roles(TRUE) as $role) {
    if (_autologout_local_settings($role) == 2 && in_array($role, array_values($account->roles))) {
      return TRUE;
    }
  }
  return FALSE;
}