Merge pull request #22232 from nextcloud/backport/22217/stable19

[stable19] Add app config option to disable "Email was changed by admin" activity
This commit is contained in:
Morris Jobke 2020-08-13 14:49:08 +02:00 committed by GitHub
commit 7e16867b29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

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