You are here

function cas_login_page in CAS 5.3

Same name and namespace in other branches
  1. 5.4 cas.module \cas_login_page()
  2. 5 cas.module \cas_login_page()
  3. 6.3 cas.module \cas_login_page()
  4. 6 cas.module \cas_login_page()
  5. 6.2 cas.module \cas_login_page()
  6. 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
Checks to see if the user needs to be logged in
1 string reference to 'cas_login_page'
cas_menu in ./cas.module
Implements hook_menu.

File

./cas.module, line 703

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 ($_REQUEST['destination']) {
    $destination = $_REQUEST['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");
  return $output;
}