function menu_example_custom_access

Determine whether the current user has the role specified.

Parameters

string $role_name: The role required for access

Return value

bool True if the acting user has the role specified.

Related topics

1 string reference to 'menu_example_custom_access'
menu_example_menu in menu_example/menu_example.module
Implements hook_menu().

File

menu_example/menu_example.module, line 379

Code

function menu_example_custom_access($role_name) {
    $access_granted = in_array($role_name, $GLOBALS['user']->roles);
    return $access_granted;
}