]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add app config option to disable "Email was changed by admin" activity 22233/head
authorMorris Jobke <hey@morrisjobke.de>
Wed, 12 Aug 2020 10:27:43 +0000 (12:27 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Thu, 13 Aug 2020 11:31:02 +0000 (13:31 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/settings/lib/Hooks.php

index ba5b572c41ac913848963cea0486322279c64d2b..913e36e102d6956123713bdff8b2601a41bee62e 100644 (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);
                }