aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2022-10-14 10:55:23 +0200
committerGitHub <noreply@github.com>2022-10-14 10:55:23 +0200
commita8101ecdb9a49dd1fd0813b627c9d58a4adfaba0 (patch)
tree6ea2a71315edfea5da0d7d414c25cf557ba55f30 /apps
parenteb911d344d950ee68a023b90b799c7ab16edbd63 (diff)
parent08a77315b45821ee50a549cbe7b22e9f2c8444c0 (diff)
downloadnextcloud-server-a8101ecdb9a49dd1fd0813b627c9d58a4adfaba0.tar.gz
nextcloud-server-a8101ecdb9a49dd1fd0813b627c9d58a4adfaba0.zip
Merge pull request #34135 from nextcloud/fix/noid/disable_activity.email_address_changed_by_admin
Fix "email changed" activity email check
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Hooks.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/settings/lib/Hooks.php b/apps/settings/lib/Hooks.php
index b7b78c49b12..a5be30be53f 100644
--- a/apps/settings/lib/Hooks.php
+++ b/apps/settings/lib/Hooks.php
@@ -178,12 +178,17 @@ class Hooks {
if ($actor instanceof IUser) {
$subject = Provider::EMAIL_CHANGED_SELF;
if ($actor->getUID() !== $user->getUID()) {
+ // set via the OCS API
+ if ($this->config->getAppValue('settings', 'disable_activity.email_address_changed_by_admin', 'no') === 'yes') {
+ return;
+ }
$subject = Provider::EMAIL_CHANGED;
}
$text = $l->t('Your email address on %s was changed.', [$instanceUrl]);
$event->setAuthor($actor->getUID())
->setSubject($subject);
} else {
+ // set with occ
if ($this->config->getAppValue('settings', 'disable_activity.email_address_changed_by_admin', 'no') === 'yes') {
return;
}