function cas_login_page in CAS 5
Same name and namespace in other branches
- 5.4 cas.module \cas_login_page()
- 5.3 cas.module \cas_login_page()
- 6.3 cas.module \cas_login_page()
- 6 cas.module \cas_login_page()
- 6.2 cas.module \cas_login_page()
- 7 cas.module \cas_login_page()
Redirects to appropriate page based on user settings.
1 call to cas_login_page()
- cas_login_check in ./
cas.module - Implementation of hook_init Traps a page load to see if authentication is required.
1 string reference to 'cas_login_page'
- cas_menu in ./
cas.module - Implements hook_menu.
File
- ./
cas.module, line 574
Code
function cas_login_page() {
global $user;
$destination = variable_get('site_frontpage', 'node');
// If it is the user's first CAS login and initial login redirection is enabled, go to the set page
if ($_SESSION['cas_first_login'] && variable_get('cas_first_login', 0) == 1) {
$destination = variable_get('cas_first_login_destination', '');
unset($_SESSION['cas_first_login']);
}
elseif ($_GET['destination']) {
$destination = $_GET['destination'];
}
elseif ($_SESSION['cas_goto']) {
$destination = $_SESSION['cas_goto'];
unset($_SESSION['cas_goto']);
}
drupal_goto($destination);
// this should never happen.
$output .= t("Cas page... you should never get here");
drupal_set_message('hi');
return $output;
}