summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-12 12:27:43 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-08-13 13:31:49 +0200
commit5ed3f439273b639513ae09c9db3e9b99b349bb12 (patch)
tree042cd7441baed8cb95e51695225c252a7b1fb12a
parent45bdfd21985616dd878fedeaf7c1c34c62cd51db (diff)
downloadnextcloud-server-5ed3f439273b639513ae09c9db3e9b99b349bb12.tar.gz
nextcloud-server-5ed3f439273b639513ae09c9db3e9b99b349bb12.zip
Add app config option to disable "Email was changed by admin" activity
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r--apps/settings/lib/Hooks.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/settings/lib/Hooks.php b/apps/settings/lib/Hooks.php
index ed72194488d..0163d466165 100644
--- a/apps/settings/lib/Hooks.php
+++ b/apps/settings/lib/Hooks.php
@@ -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);
}