function alpha_debug_access

cis7 alpha.inc alpha_debug_access($user, $roles)
cle7 alpha.inc alpha_debug_access($user, $roles)
elmsmedia7 alpha.inc alpha_debug_access($user, $roles)
icor7 alpha.inc alpha_debug_access($user, $roles)
meedjum_blog7 alpha.inc alpha_debug_access($user, $roles)
mooc7 alpha.inc alpha_debug_access($user, $roles)

A helper function to check wether the user defined by $user matches one of the roles defined by $roles.

Parameters

$user: A Drupal user as returned by user_load().

$roles: An array of roles that you want to check against $user.

Return value

A boolean, indicating wether or not $user matches one of the $roles.

1 call to alpha_debug_access()
alpha_page_alter in sites/all/themes/ulmus/omega/alpha/template.php
Implements hook_page_alter().

File

sites/all/themes/ulmus/omega/alpha/includes/alpha.inc, line 1026
Helper functions for the Alpha base theme.

Code

function alpha_debug_access($user, $roles) {
  foreach ($roles as $role) {
    if (isset($user->roles[$role])) {
      return TRUE;
    }
  }

  return FALSE;
}