You are here

function _role_static_user_roles in Role Expire 6

Same name and namespace in other branches
  1. 8 role_expire.module \_role_static_user_roles()
  2. 7 role_expire.module \_role_static_user_roles()
  3. 2.x role_expire.module \_role_static_user_roles()

Helper function; Store user roles for this page request.

Return value

array of roles

1 call to _role_static_user_roles()
role_expire_user in ./role_expire.module
Implementation of hook_user().

File

./role_expire.module, line 425
Role Expire module

Code

function _role_static_user_roles($id, $roles = '') {
  static $user_roles = array();
  if (!isset($user_roles[$id]) && is_array($roles)) {
    $user_roles[$id] = $roles;
  }
  if (!isset($user_roles[$id])) {
    return FALSE;
  }
  else {
    return $user_roles[$id];
  }
}