lib/ezsession/classes/ezpsessionhandlerdb.php
public function regenerate( $updateBackendData = true )
    {
        $oldSessionId = session_id();
        session_regenerate_id();
        $newSessionId = session_id();

        ezpEvent::getInstance()->notify( 'session/regenerate', array( $oldSessionId, $newSessionId ) );

        if ( $updateBackendData )
        {
            $db = eZDB::instance();
            if ( !$db->isConnected() )
            {
                return false;
            }

            $escOldKey = $db->escapeString( $oldSessionId );
            $escNewKey = $db->escapeString( $newSessionId );
            $escUserID = $db->escapeString( eZSession::userID() );
            eZSession::triggerCallback( 'regenerate_pre', array( $db, $escNewKey, $escOldKey, $escUserID ) );

            $db->query( "UPDATE ezsession SET session_key='$escNewKey', user_id='$escUserID' WHERE session_key='$escOldKey'" );
            $db->query( "UPDATE ezbasket SET session_id='$escNewKey' WHERE session_id='$escOldKey'" );

            eZSession::triggerCallback( 'regenerate_post', array( $db, $escNewKey, $escOldKey, $escUserID ) );
        }
        return true;
    }
public function regenerate( $updateBackendData = true )
    {
        $oldSessionId = session_id();
        session_regenerate_id();
        $newSessionId = session_id();

        ezpEvent::getInstance()->notify( 'session/regenerate', array( $oldSessionId, $newSessionId ) );

        if ( $updateBackendData )
        {
            $db = eZDB::instance();
            if ( !$db->isConnected() )
            {
                return false;
            }

            $escOldKey = $db->escapeString( $oldSessionId );
            $escNewKey = $db->escapeString( $newSessionId );
            $escUserID = $db->escapeString( eZSession::userID() );
            eZSession::triggerCallback( 'regenerate_pre', array( $db, $escNewKey, $escOldKey, $escUserID ) );

            $db->query( "UPDATE ezsession SET session_key='$escNewKey', user_id='$escUserID' WHERE session_key='$escOldKey'" );
            $db->query( "UPDATE ezbasket SET session_id='$escNewKey' WHERE session_id='$escOldKey'" );

            eZSession::triggerCallback( 'regenerate_post', array( $db, $escNewKey, $escOldKey, $escUserID ) );
        }
        return true;
    }
public function regenerate ( $ updateBackendData = true ) { $ oldSessionId = session_id ( ) ; session_regenerate_id ( ) ; $ newSessionId = session_id ( ) ; ezpEvent :: getInstance ( ) -> notify ( 'session/regenerate' , array ( $ oldSessionId , $ newSessionId ) ) ; if ( $ updateBackendData ) { $ db = eZDB :: instance ( ) ; if ( ! $ db -> isConnected ( ) ) { return false ; } $ escOldKey = $ db -> escapeString ( $ oldSessionId ) ; $ escNewKey = $ db -> escapeString ( $ newSessionId ) ; $ escUserID = $ db -> escapeString ( eZSession :: userID ( ) ) ; eZSession :: triggerCallback ( 'regenerate_pre' , array ( $ db , $ escNewKey , $ escOldKey , $ escUserID ) ) ; $ db -> query ( "UPDATE ezsession SET session_key='$escNewKey', user_id='$escUserID' WHERE session_key='$escOldKey'" ) ; $ db -> query ( "UPDATE ezbasket SET session_id='$escNewKey' WHERE session_id='$escOldKey'" ) ; eZSession :: triggerCallback ( 'regenerate_post' , array ( $ db , $ escNewKey , $ escOldKey , $ escUserID ) ) ; } return true ; }
Regenerate session id

@param bool $updateBackendData (true if we want to keep session data with the new session id)
@return bool
Regenerate session id