You are here

function cas_save_page in CAS 6

Same name and namespace in other branches
  1. 5.4 cas.module \cas_save_page()
  2. 5 cas.module \cas_save_page()
  3. 5.3 cas.module \cas_save_page()
  4. 6.2 cas.module \cas_save_page()

Saves the page that the user was on when login was requested or required

1 call to cas_save_page()
cas_login_check in ./cas.module
Checks to see if the user needs to be logged in

File

./cas.module, line 523

Code

function cas_save_page() {
  if (!$_SESSION['cas_goto']) {
    if (arg(0) == 'cas') {

      //we're were destined to the CAS login page, so set

      //the page to the referrer.
      $_SESSION['cas_goto'] = $_SERVER['HTTP_REFERER'];
    }
    else {

      //We're destined for another page, so save the group.
      $_SESSION['cas_goto'] = $_GET['q'];
    }
  }
}