public function getCurrentFrontendUser() { if (true === empty($GLOBALS['TSFE']->loginUser)) { return null; } return $this->frontendUserRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']); }