1
0
Fork 0

Move "submanage" Session value into own methods

This commit is contained in:
Philipp Holzer 2022-10-21 19:33:28 +02:00
commit 44a9683008
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
8 changed files with 37 additions and 11 deletions

View file

@ -32,7 +32,7 @@ function removeme_post(App $a)
return;
}
if (!empty($_SESSION['submanage'])) {
if (DI::userSession()->getSubManagedUserId()) {
return;
}

View file

@ -51,7 +51,7 @@ function settings_post(App $a)
return;
}
if (!empty($_SESSION['submanage'])) {
if (DI::userSession()->getSubManagedUserId()) {
return;
}
@ -152,7 +152,7 @@ function settings_content(App $a)
return Login::form();
}
if (!empty($_SESSION['submanage'])) {
if (DI::userSession()->getSubManagedUserId()) {
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
return '';
}