]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/RemoveMe.php
Merge branch 'develop' into mastodon-instance-v2-implementation
[friendica.git] / src / Module / Settings / RemoveMe.php
index 87bc6152a5b32fb369c2d0bd3b416a6df71df121..1225cc1e2e10eb9384b1cf7551ce81bca0e810cd 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
  *
@@ -85,14 +85,8 @@ class RemoveMe extends BaseSettings
                }
 
                // send notification to admins so that they can clean up the backups
-               $admin_mails = explode(',', $this->config->get('config', 'admin_email'));
-               foreach ($admin_mails as $mail) {
-                       $admin = $this->database->selectFirst('user', ['uid', 'language', 'email', 'username'], ['email' => trim($mail)]);
-                       if (!$admin) {
-                               continue;
-                       }
-
-                       $l10n = $this->l10n->withLang($admin['language']);
+               foreach (User::getAdminListForEmailing(['uid', 'language', 'email']) as $admin) {
+                       $l10n = $this->l10n->withLang($admin['language'] ?: 'en');
 
                        $email = $this->emailer
                                ->newSystemMail()