Exemple #1
0
 /**
  * userLogin: log the user in. Assumes ticket has been checked, etc.
  * @param CASAuthInfo $authinfo - identifies the of the user to log in.
  */
 public static function userLogin($authinfo)
 {
     // Assign session variables.
     $_SESSION['cas_username'] = $authinfo->getUsername();
     $_SESSION["cas_email"] = $authinfo->getUsername() . '@' . CASOptions::EmailDomain();
     $_SESSION['cas_logged_in'] = true;
     $_SESSION['cas_authtype'] = $authinfo->getAuthType();
     if ($authinfo->getMailList() !== false) {
         $_SESSION['cas_maillist'] = $authinfo->getMailList();
     }
     return true;
 }