public function applySecurityRules(bool $secure = false, bool $httponly = false)
    {
        $nb_engine = CNabuEngine::getEngine();

        $attrs = session_get_cookie_params();
        session_set_cookie_params(
            $attrs['lifetime'],
            $attrs['path'],
            $attrs['domain'],
            $secure || $attrs['secure'],
            $httponly || (array_key_exists('httponly', $attrs) && $attrs['httponly'])
        );

        session_start();
        $nb_engine->traceLog("Session ID", session_id());

        $this->purgeNonce();

        if (isset($_SESSION) && count($_SESSION) > 0) {
            foreach ($_SESSION as $value) {
                if ($value instanceof INabuDBObject && !$value->isBuiltIn()) {
                    $value->relinkDB();
                }
            }
        }
    }
public function applySecurityRules(bool $secure = false, bool $httponly = false)
    {
        $nb_engine = CNabuEngine::getEngine();

        $attrs = session_get_cookie_params();
        session_set_cookie_params(
            $attrs['lifetime'],
            $attrs['path'],
            $attrs['domain'],
            $secure || $attrs['secure'],
            $httponly || (array_key_exists('httponly', $attrs) && $attrs['httponly'])
        );

        session_start();
        $nb_engine->traceLog("Session ID", session_id());

        $this->purgeNonce();

        if (isset($_SESSION) && count($_SESSION) > 0) {
            foreach ($_SESSION as $value) {
                if ($value instanceof INabuDBObject && !$value->isBuiltIn()) {
                    $value->relinkDB();
                }
            }
        }
    }
public function applySecurityRules ( bool $ secure = false , bool $ httponly = false ) { $ nb_engine = CNabuEngine :: getEngine ( ) ; $ attrs = session_get_cookie_params ( ) ; session_set_cookie_params ( $ attrs [ 'lifetime' ] , $ attrs [ 'path' ] , $ attrs [ 'domain' ] , $ secure || $ attrs [ 'secure' ] , $ httponly || ( array_key_exists ( 'httponly' , $ attrs ) && $ attrs [ 'httponly' ] ) ) ; session_start ( ) ; $ nb_engine -> traceLog ( "Session ID" , session_id ( ) ) ; $ this -> purgeNonce ( ) ; if ( isset ( $ _SESSION ) && count ( $ _SESSION ) > 0 ) { foreach ( $ _SESSION as $ value ) { if ( $ value instanceof INabuDBObject && ! $ value -> isBuiltIn ( ) ) { $ value -> relinkDB ( ) ; } } } }
Apply requested security options to protect the session.
@param bool $secure If true, forces to set the secure flag of session cookie
@param bool $httponly If true, forces to set the httponly flag of session cookie
Apply requested security options to protect the session .