You are here

function _role_static_user_roles in Role Expire 7

Same name and namespace in other branches
  1. 8 role_expire.module \_role_static_user_roles()
  2. 6 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_load in ./role_expire.module
Implements hook_user_load().

File

./role_expire.module, line 635
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];
  }
}