function cas_menu in CAS 5.4
Same name and namespace in other branches
- 5 cas.module \cas_menu()
- 5.3 cas.module \cas_menu()
- 6.3 cas.module \cas_menu()
- 6 cas.module \cas_menu()
- 6.2 cas.module \cas_menu()
- 7 cas.module \cas_menu()
Implements hook_menu.
File
- ./
cas.module, line 338
Code
function cas_menu($may_cache) {
global $user;
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/user/cas',
'title' => t('CAS settings'),
'description' => 'Configure central authentication services',
'callback' => 'drupal_get_form',
'callback arguments' => 'cas_admin_settings',
'access' => user_access('administer cas'),
'type' => MENU_NORMAL_ITEM,
);
if (!$user->uid || arg(0) == 'admin' && arg(1) == 'build' && arg(2) == 'menu') {
$items[] = array(
'path' => 'cas',
'title' => t('CAS Login'),
'callback' => 'cas_login_page',
'access' => TRUE,
'type' => MENU_SUGGESTED_ITEM,
);
}
if ($user->uid || arg(0) == 'admin' && arg(1) == 'build' && arg(2) == 'menu') {
$items[] = array(
'path' => 'caslogout',
'title' => t('CAS Logout'),
'callback' => 'cas_logout',
'access' => TRUE,
'type' => MENU_SUGGESTED_ITEM,
);
}
}
else {
_cas_single_sign_out_check();
cas_login_check();
}
return $items;
}