public function discardFakeFrontEnd()
    {
        if (!$this->hasFakeFrontEnd()) {
            return;
        }

        $this->logoutFrontEndUser();

        $GLOBALS['TSFE'] = null;
        $GLOBALS['TT'] = null;
        unset(
            $GLOBALS['TYPO3_CONF_VARS']['FE']['dontSetCookie'],
            $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][FrontendUserAuthentication::class]
        );

        $this->hasFakeFrontEnd = false;
    }
public function discardFakeFrontEnd()
    {
        if (!$this->hasFakeFrontEnd()) {
            return;
        }

        $this->logoutFrontEndUser();

        $GLOBALS['TSFE'] = null;
        $GLOBALS['TT'] = null;
        unset(
            $GLOBALS['TYPO3_CONF_VARS']['FE']['dontSetCookie'],
            $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][FrontendUserAuthentication::class]
        );

        $this->hasFakeFrontEnd = false;
    }
public function discardFakeFrontEnd ( ) { if ( ! $ this -> hasFakeFrontEnd ( ) ) { return ; } $ this -> logoutFrontEndUser ( ) ; $ GLOBALS [ 'TSFE' ] = null ; $ GLOBALS [ 'TT' ] = null ; unset ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'FE' ] [ 'dontSetCookie' ] , $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'SYS' ] [ 'Objects' ] [ FrontendUserAuthentication :: class ] ) ; $ this -> hasFakeFrontEnd = false ; }
Discards the fake front end.

This function nulls out $GLOBALS['TSFE'] and $GLOBALS['TT']. In addition,
any logged-in front-end user will be logged out.

The page record for the current front end will _not_ be deleted by this
function, though.

If no fake front end has been created, this function does nothing.

@return void
Discards the fake front end .