[BUGFIX] Make backend user global available early 20/18420/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Thu, 21 Feb 2013 14:01:02 +0000 (15:01 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 26 Feb 2013 18:39:31 +0000 (19:39 +0100)
The global must be available very early, because methods below
might trigger code which relies on it. In particular the workspace
overlay of the rootline which is done in certain cases.

Fixes: #45625
Releases: 6.0, 6.1
Change-Id: I035f27e11cd56fc284442b66ad8357060f76e52c
Reviewed-on: https://review.typo3.org/18420
Reviewed-by: Mattias Nilsson
Reviewed-by: Oliver Klee
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Core/Bootstrap.php

index 59e3174..bf4b37a 100644 (file)
@@ -851,10 +851,12 @@ class Bootstrap {
                if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) {
                        $backendUser->dontSetCookie = TRUE;
                }
+               // The global must be available very early, because methods below
+               // might triger code which relies on it. See: #45625
+               $GLOBALS['BE_USER'] = $backendUser;
                $backendUser->start();
                $backendUser->checkCLIuser();
                $backendUser->backendCheckLogin();
-               $GLOBALS['BE_USER'] = $backendUser;
                return $this;
        }