]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/Delegation.php
Merge remote-tracking branch 'upstream/develop' into audience
[friendica.git] / src / Module / Settings / Delegation.php
index a7046d40c71e6535d350889813df51400a096daf..134b002c1bc79c85df3820b26d1f9d2f45b07f06 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -76,7 +76,7 @@ class Delegation extends BaseSettings
                $user_id = $args->get(3);
 
                if ($action === 'add' && $user_id) {
-                       if (DI::session()->get('submanage')) {
+                       if (DI::userSession()->getSubManagedUserId()) {
                                DI::sysmsg()->addNotice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.'));
                                DI::baseUrl()->redirect('settings/delegation');
                        }
@@ -98,7 +98,7 @@ class Delegation extends BaseSettings
                }
 
                if ($action === 'remove' && $user_id) {
-                       if (DI::session()->get('submanage')) {
+                       if (DI::userSession()->getSubManagedUserId()) {
                                DI::sysmsg()->addNotice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.'));
                                DI::baseUrl()->redirect('settings/delegation');
                        }