Fix: Avoid getting spammed when an admin has got several accounts
This commit is contained in:
parent
5d708fd9a9
commit
a4d976b70f
|
@ -33,11 +33,12 @@ function removeme_post(App $a)
|
||||||
|
|
||||||
// send notification to admins so that they can clean um the backups
|
// send notification to admins so that they can clean um the backups
|
||||||
// send email to admins
|
// send email to admins
|
||||||
$admin_mail_list = "'" . implode("','", array_map(dbesc, explode(",", str_replace(" ", "", $a->config['admin_email'])))) . "'";
|
$admin_mails = explode(",", str_replace(" ", "", $a->config['admin_email']));
|
||||||
$adminlist = q("SELECT uid, language, email FROM user WHERE email IN (%s)",
|
foreach (admin_mails as $mail) {
|
||||||
$admin_mail_list
|
$admin = dba::selectFirst('user', ['uid', 'language', 'email'], ['email' => $mail]);
|
||||||
);
|
if (!DBM::is_result($admin)) {
|
||||||
foreach ($adminlist as $admin) {
|
continue;
|
||||||
|
}
|
||||||
notification([
|
notification([
|
||||||
'type' => SYSTEM_EMAIL,
|
'type' => SYSTEM_EMAIL,
|
||||||
'subject' => L10n::t('[Friendica System Notify]') . ' ' . L10n::t('User deleted their account'),
|
'subject' => L10n::t('[Friendica System Notify]') . ' ' . L10n::t('User deleted their account'),
|
||||||
|
|
Loading…
Reference in a new issue