Core/Session/Session.php
protected function validate()
    {
        // Are needed session variables set ?
        if (!isset($_SESSION['s3ss10nCr3at3d']) || !isset($_SESSION['n3k0t'])) {
            return false;
        }

        // Check if session token match ?
        if ($this->matchUserAgent) {
            if ($_SESSION['n3k0t'] !== hash_hmac($this->hashAlgo, $_SERVER['HTTP_USER_AGENT'] . $_SESSION['s3ss10nCr3at3d'], $this->hashKey)) {
                return false;
            }
        } elseif ($_SESSION['n3k0t'] !== hash_hmac($this->hashAlgo, $_SESSION['s3ss10nCr3at3d'], $this->hashKey)) {
            return false;
        }

        // Is session expired ?
        if ((time() > ($_SESSION['s3ss10nCr3at3d']) + $this->expiration)) {
            return false;
        }

        // Everything is fine return true
        return true;
    }
protected function validate()
    {
        // Are needed session variables set ?
        if (!isset($_SESSION['s3ss10nCr3at3d']) || !isset($_SESSION['n3k0t'])) {
            return false;
        }

        // Check if session token match ?
        if ($this->matchUserAgent) {
            if ($_SESSION['n3k0t'] !== hash_hmac($this->hashAlgo, $_SERVER['HTTP_USER_AGENT'] . $_SESSION['s3ss10nCr3at3d'], $this->hashKey)) {
                return false;
            }
        } elseif ($_SESSION['n3k0t'] !== hash_hmac($this->hashAlgo, $_SESSION['s3ss10nCr3at3d'], $this->hashKey)) {
            return false;
        }

        // Is session expired ?
        if ((time() > ($_SESSION['s3ss10nCr3at3d']) + $this->expiration)) {
            return false;
        }

        // Everything is fine return true
        return true;
    }
protected function validate ( ) { // Are needed session variables set ? if ( ! isset ( $ _SESSION [ 's3ss10nCr3at3d' ] ) || ! isset ( $ _SESSION [ 'n3k0t' ] ) ) { return false ; } // Check if session token match ? if ( $ this -> matchUserAgent ) { if ( $ _SESSION [ 'n3k0t' ] !== hash_hmac ( $ this -> hashAlgo , $ _SERVER [ 'HTTP_USER_AGENT' ] . $ _SESSION [ 's3ss10nCr3at3d' ] , $ this -> hashKey ) ) { return false ; } } elseif ( $ _SESSION [ 'n3k0t' ] !== hash_hmac ( $ this -> hashAlgo , $ _SESSION [ 's3ss10nCr3at3d' ] , $ this -> hashKey ) ) { return false ; } // Is session expired ? if ( ( time ( ) > ( $ _SESSION [ 's3ss10nCr3at3d' ] ) + $ this -> expiration ) ) { return false ; } // Everything is fine return true return true ; }
Validate session.

@return bool
Validate session .