Move "submanage" Session value into own methods

This commit is contained in:
Philipp
2022-10-21 19:33:28 +02:00
parent cafb23f8f0
commit 44a9683008
8 changed files with 37 additions and 11 deletions

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 '';
}