function cas_menu in CAS 6.3
Same name and namespace in other branches
- 5.4 cas.module \cas_menu()
- 5 cas.module \cas_menu()
- 5.3 cas.module \cas_menu()
- 6 cas.module \cas_menu()
- 6.2 cas.module \cas_menu()
- 7 cas.module \cas_menu()
Implementation of hook_menu().
File
- ./
cas.module, line 318 - Enables users to authenticate via a Central Authentication Service (CAS) Cas will currently work if the auto registration is turned on and will create user accounts automatically.
Code
function cas_menu() {
global $user;
$items = array();
//cas_login_check();
$items['admin/user/cas'] = array(
'title' => 'CAS settings',
'description' => 'Configure central authentication services',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'cas_admin_settings',
),
'access arguments' => array(
'administer cas',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'cas.admin.inc',
);
$items['admin/user/cas/settings'] = array(
'title' => 'CAS',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/user/user/cas/create'] = array(
'title' => 'Add CAS user',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'cas_add_user_form',
),
'access arguments' => array(
'administer users',
),
'type' => MENU_LOCAL_TASK,
'file' => 'cas.user.inc',
'tab_parent' => 'admin/user/user',
'weight' => 1,
);
$items['user/%user/cas'] = array(
'title' => 'CAS',
'page callback' => 'cas_user_identities',
'page arguments' => array(
1,
),
'access arguments' => array(
'administer users',
),
'type' => MENU_LOCAL_TASK,
'file' => 'cas.pages.inc',
'weight' => 1,
);
$items['user/%user/cas/delete'] = array(
'title' => 'Delete CAS username',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'cas_user_delete_form',
1,
),
'access arguments' => array(
'administer users',
),
'file' => 'cas.pages.inc',
);
$items['cas'] = array(
'path' => 'cas',
'title' => 'CAS Login',
'page callback' => 'cas_login_page',
'access callback' => 'user_is_anonymous',
'type' => MENU_SUGGESTED_ITEM,
);
$items['caslogout'] = array(
'title' => 'CAS Logout',
'page callback' => 'cas_logout',
'access callback' => 'cas_user_is_logged_in',
'type' => MENU_SUGGESTED_ITEM,
);
return $items;
}