Core/Session/Session.php
public function regenerate()
    {
        // If headers already sent can't do much
        if (headers_sent()) {
            return;
        }
        
        // Clear old session data
        $_SESSION = [];
        // Set session start time
        $_SESSION['s3ss10nCr3at3d'] = time();
        // Set new session token
        if ($this->matchUserAgent) {
            $_SESSION['n3k0t'] = hash_hmac($this->hashAlgo, $_SERVER['HTTP_USER_AGENT'] . $_SESSION['s3ss10nCr3at3d'], $this->hashKey);
        } else {
            $_SESSION['n3k0t'] = hash_hmac($this->hashAlgo, $_SESSION['s3ss10nCr3at3d'], $this->hashKey);
        }
        // Regenerate session
        session_regenerate_id();
    }
public function regenerate()
    {
        // If headers already sent can't do much
        if (headers_sent()) {
            return;
        }
        
        // Clear old session data
        $_SESSION = [];
        // Set session start time
        $_SESSION['s3ss10nCr3at3d'] = time();
        // Set new session token
        if ($this->matchUserAgent) {
            $_SESSION['n3k0t'] = hash_hmac($this->hashAlgo, $_SERVER['HTTP_USER_AGENT'] . $_SESSION['s3ss10nCr3at3d'], $this->hashKey);
        } else {
            $_SESSION['n3k0t'] = hash_hmac($this->hashAlgo, $_SESSION['s3ss10nCr3at3d'], $this->hashKey);
        }
        // Regenerate session
        session_regenerate_id();
    }
public function regenerate ( ) { // If headers already sent can't do much if ( headers_sent ( ) ) { return ; } // Clear old session data $ _SESSION = [ ] ; // Set session start time $ _SESSION [ 's3ss10nCr3at3d' ] = time ( ) ; // Set new session token if ( $ this -> matchUserAgent ) { $ _SESSION [ 'n3k0t' ] = hash_hmac ( $ this -> hashAlgo , $ _SERVER [ 'HTTP_USER_AGENT' ] . $ _SESSION [ 's3ss10nCr3at3d' ] , $ this -> hashKey ) ; } else { $ _SESSION [ 'n3k0t' ] = hash_hmac ( $ this -> hashAlgo , $ _SESSION [ 's3ss10nCr3at3d' ] , $ this -> hashKey ) ; } // Regenerate session session_regenerate_id ( ) ; }
Completely regenerate session.
Completely regenerate session .