]> git.mxchange.org Git - friendica.git/blobdiff - mod/removeme.php
Merge pull request #11761 from tobiasd/20220722-zh-cn
[friendica.git] / mod / removeme.php
index ee0a4c275b6f1f56745649596152593d051003d6..e86e5646795d54233486b73bda7aec716f7d88c4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -57,20 +57,22 @@ function removeme_post(App $a)
                        continue;
                }
 
+               $l10n = DI::l10n()->withLang($admin['language']);
+
                $email = DI::emailer()
                        ->newSystemMail()
                        ->withMessage(
-                               DI::l10n()->t('[Friendica System Notify]') . ' ' . DI::l10n()->t('User deleted their account'),
-                               DI::l10n()->t('On your Friendica node an user deleted their account. Please ensure that their data is removed from the backups.'),
-                               DI::l10n()->t('The user id is %d', local_user()))
+                               $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', local_user()))
                        ->forUser($admin)
                        ->withRecipient($admin['email'])
                        ->build();
                DI::emailer()->send($email);
        }
 
-       if (User::getIdFromPasswordAuthentication($a->user, trim($_POST['qxz_password']))) {
-               User::remove($a->user['uid']);
+       if (User::getIdFromPasswordAuthentication($a->getLoggedInUserId(), trim($_POST['qxz_password']))) {
+               User::remove($a->getLoggedInUserId());
 
                unset($_SESSION['authenticated']);
                unset($_SESSION['uid']);