Pimcore\Tool\Session::backupForeignSession PHP Method

backupForeignSession() protected static method

protected static backupForeignSession ( ) : boolean
return boolean
    protected static function backupForeignSession()
    {
        $sName = self::getOption("name");
        if ($sName != session_name()) {
            // there's a different session in use, stop it and restart the admin session
            self::$restoreSession = ["name" => session_name(), "id" => session_id()];
            if (session_id()) {
                @session_write_close();
            }
            if (isset($_COOKIE[$sName])) {
                session_id($_COOKIE[$sName]);
            }
            return true;
        }
        return false;
    }