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

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

View File

@ -198,6 +198,9 @@ class Hooks {
$event->setAuthor($actor->getUID())
->setSubject($subject);
} 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]);
$event->setSubject(Provider::EMAIL_CHANGED);
}