From 5b04da821b2927a6c8bc2044377676aa8ed2c395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Scho=CC=88ne?= Date: Mon, 29 Jul 2019 10:20:18 +0200 Subject: [PATCH] Check for existing TSFE and logged in user before initializing feUser --- Classes/Controller/AbstractController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Classes/Controller/AbstractController.php b/Classes/Controller/AbstractController.php index f65ae746f..32c66738c 100755 --- a/Classes/Controller/AbstractController.php +++ b/Classes/Controller/AbstractController.php @@ -249,9 +249,7 @@ public function injectGetPostVarAdapterFactory(Tx_PtExtlist_Domain_StateAdapter_ public function initializeAction() { parent::initializeAction(); - if (!TYPO3_MODE === 'BE') { - $this->initFeUser(); - } + $this->initFeUser(); $this->initListIdentifier(); $this->buildConfigurationBuilder(); $this->buildAndInitSessionPersistenceManager(); @@ -319,7 +317,7 @@ protected function resetOnEmptySubmit() } } - + /** * @return void @@ -492,7 +490,9 @@ protected function redirect($actionName, $controllerName = null, $extensionName protected function initFeUser() { - $userUid = $GLOBALS['TSFE']->fe_user->user['uid']; - $this->feUser = $this->feUserRepository->findByUid($userUid); + if (array_key_exists('TSFE', $GLOBALS) && $GLOBALS['TSFE']->loginUser) { + $userUid = $GLOBALS['TSFE']->fe_user->user['uid']; + $this->feUser = $this->feUserRepository->findByUid($userUid); + } } }