Add app config option to disable "Email was changed by admin" email

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2020-08-12 12:27:43 +02:00
parent 138f47a1b9
commit 53fab3fe5f
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 3 additions and 0 deletions

View File

@ -182,6 +182,9 @@ class Hooks {
$event->setAuthor($actor->getUID())
->setSubject($subject);
} else {
if ($this->config->getAppValue('settings', 'disable_email.email_address_changed_by_admin', 'no') === 'yes') {
return;
}
$text = $l->t('Your email address on %s was changed by an administrator.', [$instanceUrl]);
$event->setSubject(Provider::EMAIL_CHANGED);
}