You are here

function _cas_single_sign_out_save_token in CAS 6.3

Same name and namespace in other branches
  1. 5.4 cas.module \_cas_single_sign_out_save_token()
  2. 5.3 cas.module \_cas_single_sign_out_save_token()
  3. 6.2 cas.module \_cas_single_sign_out_save_token()
  4. 7 cas.module \_cas_single_sign_out_save_token()
1 call to _cas_single_sign_out_save_token()
cas_login_check in ./cas.module
Checks to see if the user needs to be logged in.

File

./cas.module, line 1090
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_single_sign_out_save_token($user) {

  // Ok lets save the CAS service ticket to DB so
  // we can handle CAS logoutRequests when they come
  if ($user->uid && $user->uid > 0 && !empty($_SESSION['cas_ticket'])) {
    db_query("INSERT INTO {cas_login_data} (cas_session_id, uid) VALUES ('%s', %d)", $_SESSION['cas_ticket'], $user->uid);
    unset($_SESSION['cas_ticket']);
  }
}