src/Session.php
public static function regenerateId($delOldSession = false)
    {
        $success = false;
        if (self::$status['regenerated']) {
            // already regenerated... no sense in doing it again
            return false;
        }
        if (empty(self::$status['requestId'])) {
            // no session id was passed... there's no need to regenerate!
            return false;
        }
        if (\session_status() === PHP_SESSION_NONE) {
            // there's currently not a session
            self::$cfgStatic['regenOnStart'] = true;
        }
        if (\session_status() === PHP_SESSION_ACTIVE) {
            $success = \session_regenerate_id($delOldSession);
            self::$cfgStatic['regenOnStart'] = false;
            self::$status['regenerated'] = true;
        }
        if ($success) {
            \bdk\Debug::_info('new session_id', \session_id());
        }
        return $success;
    }
public static function regenerateId($delOldSession = false)
    {
        $success = false;
        if (self::$status['regenerated']) {
            // already regenerated... no sense in doing it again
            return false;
        }
        if (empty(self::$status['requestId'])) {
            // no session id was passed... there's no need to regenerate!
            return false;
        }
        if (\session_status() === PHP_SESSION_NONE) {
            // there's currently not a session
            self::$cfgStatic['regenOnStart'] = true;
        }
        if (\session_status() === PHP_SESSION_ACTIVE) {
            $success = \session_regenerate_id($delOldSession);
            self::$cfgStatic['regenOnStart'] = false;
            self::$status['regenerated'] = true;
        }
        if ($success) {
            \bdk\Debug::_info('new session_id', \session_id());
        }
        return $success;
    }
public static function regenerateId ( $ delOldSession = false ) { $ success = false ; if ( self :: $ status [ 'regenerated' ] ) { // already regenerated... no sense in doing it again return false ; } if ( empty ( self :: $ status [ 'requestId' ] ) ) { // no session id was passed... there's no need to regenerate! return false ; } if ( \ session_status ( ) === PHP_SESSION_NONE ) { // there's currently not a session self :: $ cfgStatic [ 'regenOnStart' ] = true ; } if ( \ session_status ( ) === PHP_SESSION_ACTIVE ) { $ success = \ session_regenerate_id ( $ delOldSession ) ; self :: $ cfgStatic [ 'regenOnStart' ] = false ; self :: $ status [ 'regenerated' ] = true ; } if ( $ success ) { \ bdk \ Debug :: _info ( 'new session_id' , \ session_id ( ) ) ; } return $ success ; }
Assign new session id

@param boolean $delOldSession invalidate existing id?

@return boolean
Assign new session id