]> git.mxchange.org Git - friendica.git/blobdiff - mod/removeme.php
Unused use removed
[friendica.git] / mod / removeme.php
index 5555fcbb7b4a16231efa86b4c73d715f5157454b..9ef372fede6d95fe3106826e8b9c6f9fc98945d5 100644 (file)
@@ -21,7 +21,6 @@
 
 use Friendica\App;
 use Friendica\Core\Renderer;
-use Friendica\Core\Session;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\User;
@@ -29,11 +28,11 @@ use Friendica\Util\Strings;
 
 function removeme_post(App $a)
 {
-       if (!Session::getLocalUser()) {
+       if (!DI::userSession()->getLocalUserId()) {
                return;
        }
 
-       if (!empty($_SESSION['submanage'])) {
+       if (DI::userSession()->getSubManagedUserId()) {
                return;
        }
 
@@ -65,7 +64,7 @@ function removeme_post(App $a)
                        ->withMessage(
                                $l10n->t('[Friendica System Notify]') . ' ' . $l10n->t('User deleted their account'),
                                $l10n->t('On your Friendica node an user deleted their account. Please ensure that their data is removed from the backups.'),
-                               $l10n->t('The user id is %d', Session::getLocalUser()))
+                               $l10n->t('The user id is %d', DI::userSession()->getLocalUserId()))
                        ->forUser($admin)
                        ->withRecipient($admin['email'])
                        ->build();
@@ -84,7 +83,7 @@ function removeme_post(App $a)
 
 function removeme_content(App $a)
 {
-       if (!Session::getLocalUser()) {
+       if (!DI::userSession()->getLocalUserId()) {
                DI::baseUrl()->redirect();
        }