From aa2315875694632545f9d4efd9172c72f2f51c82 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 12 Aug 2020 12:27:43 +0200 Subject: [PATCH] Add app config option to disable "Email was changed by admin" activity Signed-off-by: Morris Jobke --- apps/settings/lib/Hooks.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/settings/lib/Hooks.php b/apps/settings/lib/Hooks.php index ba5b572c41a..913e36e102d 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); } -- 2.39.5