[TASK] Unify handling of TYPO3_PROCEED_IF_NO_USER
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / RequestHandler.php
index 23be5e2..e2bae71 100644 (file)
@@ -47,6 +47,13 @@ class RequestHandler implements RequestHandlerInterface {
         * @return void
         */
        public function handleRequest() {
+               // Evaluate the constant for skipping the BE user check for the bootstrap
+               if (defined('TYPO3_PROCEED_IF_NO_USER') && TYPO3_PROCEED_IF_NO_USER) {
+                       $proceedIfNoUserIsLoggedIn = TRUE;
+               } else {
+                       $proceedIfNoUserIsLoggedIn = FALSE;
+               }
+
                $this->bootstrap
                        ->checkLockedBackendAndRedirectOrDie()
                        ->checkBackendIpOrDie()
@@ -55,7 +62,7 @@ class RequestHandler implements RequestHandlerInterface {
                        ->loadExtensionTables(TRUE)
                        ->initializeSpriteManager()
                        ->initializeBackendUser()
-                       ->initializeBackendAuthentication()
+                       ->initializeBackendAuthentication($proceedIfNoUserIsLoggedIn)
                        ->initializeLanguageObject()
                        ->initializeBackendTemplate()
                        ->endOutputBufferingAndCleanPreviousOutput()