diff --git a/Classes/Controller/ProfileController.php b/Classes/Controller/ProfileController.php index 4cbfabb..31ea71c 100644 --- a/Classes/Controller/ProfileController.php +++ b/Classes/Controller/ProfileController.php @@ -92,6 +92,7 @@ public function showProfileSwitchAction(): ResponseInterface { $profileUids = $this->context->getPropertyFromAspect('frontend.profile', 'allProfileUids', []); + // TODO: Don't return empty response if no profiles are assigned to user if (empty($profileUids)) { return $this->htmlResponse(); } @@ -135,6 +136,8 @@ public function showProfileEditingFormAction(Profile $profile = null): ResponseI } $profileUids = $this->context->getPropertyFromAspect('frontend.profile', 'allProfileUids', []); + + // TODO: To die() is no good way out here, talk to your trusted TYPO3 developer first if ($profile === null || !in_array($profile->getUid(), $profileUids)) { GeneralUtility::makeInstance(ErrorController::class)->accessDeniedAction( $this->request,