source/CAS/Client.php
private function _renameSession($ticket)
    {
        phpCAS::traceBegin();
        if ($this->getChangeSessionID()) {
            if (!empty($this->_user)) {
                $old_session = $_SESSION;
                phpCAS :: trace("Killing session: ". session_id());
                session_destroy();
                // set up a new session, of name based on the ticket
                $session_id = $this->_sessionIdForTicket($ticket);
                phpCAS :: trace("Starting session: ". $session_id);
                session_id($session_id);
                session_start();
                phpCAS :: trace("Restoring old session vars");
                $_SESSION = $old_session;
            } else {
                phpCAS :: trace (
                    'Session should only be renamed after successfull authentication'
                );
            }
        } else {
            phpCAS :: trace(
                "Skipping session rename since phpCAS is not handling the session."
            );
        }
        phpCAS::traceEnd();
    }
private function _renameSession($ticket)
    {
        phpCAS::traceBegin();
        if ($this->getChangeSessionID()) {
            if (!empty($this->_user)) {
                $old_session = $_SESSION;
                phpCAS :: trace("Killing session: ". session_id());
                session_destroy();
                // set up a new session, of name based on the ticket
                $session_id = $this->_sessionIdForTicket($ticket);
                phpCAS :: trace("Starting session: ". $session_id);
                session_id($session_id);
                session_start();
                phpCAS :: trace("Restoring old session vars");
                $_SESSION = $old_session;
            } else {
                phpCAS :: trace (
                    'Session should only be renamed after successfull authentication'
                );
            }
        } else {
            phpCAS :: trace(
                "Skipping session rename since phpCAS is not handling the session."
            );
        }
        phpCAS::traceEnd();
    }
private function _renameSession ( $ ticket ) { phpCAS :: traceBegin ( ) ; if ( $ this -> getChangeSessionID ( ) ) { if ( ! empty ( $ this -> _user ) ) { $ old_session = $ _SESSION ; phpCAS :: trace ( "Killing session: " . session_id ( ) ) ; session_destroy ( ) ; // set up a new session, of name based on the ticket $ session_id = $ this -> _sessionIdForTicket ( $ ticket ) ; phpCAS :: trace ( "Starting session: " . $ session_id ) ; session_id ( $ session_id ) ; session_start ( ) ; phpCAS :: trace ( "Restoring old session vars" ) ; $ _SESSION = $ old_session ; } else { phpCAS :: trace ( 'Session should only be renamed after successfull authentication' ) ; } } else { phpCAS :: trace ( "Skipping session rename since phpCAS is not handling the session." ) ; } phpCAS :: traceEnd ( ) ; }
Renaming the session

@param string $ticket name of the ticket

@return void
Renaming the session