diff --git a/app/AdminModule/Forms/EditRoleFormFactory.php b/app/AdminModule/Forms/EditRoleFormFactory.php index 2dad82d74..b6f5052af 100644 --- a/app/AdminModule/Forms/EditRoleFormFactory.php +++ b/app/AdminModule/Forms/EditRoleFormFactory.php @@ -196,7 +196,7 @@ public function processForm(Form $form, stdClass $values): void $this->role->setRegisterableTo($values->registerableTo); $this->role->setCapacity($capacity); $this->role->setApprovedAfterRegistration($values->approvedAfterRegistration); - $this->role->setMinimumAge($values->minimumAge); + $this->role->setMinimumAge((int) $values->minimumAge); $this->role->setPermissions($this->permissionRepository->findPermissionsByIds($values->permissions)); $this->role->setPages($this->pageRepository->findPagesBySlugs($values->pages)); $this->role->setRedirectAfterLogin($values->redirectAfterLogin); diff --git a/app/WebModule/Components/ApplicationsGridControl.php b/app/WebModule/Components/ApplicationsGridControl.php index 082522d1d..2fd3f2bb0 100644 --- a/app/WebModule/Components/ApplicationsGridControl.php +++ b/app/WebModule/Components/ApplicationsGridControl.php @@ -79,6 +79,10 @@ public function createComponentApplicationsGrid(string $name): void $presenter = $this->getPresenter(); assert($presenter instanceof WebBasePresenter); + if (! $presenter->getUser()->isLoggedIn()) { + return; + } + $this->user = $presenter->getDbUser(); $explicitSubeventsExists = $this->subeventRepository->explicitSubeventsExists();