We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c63f61d commit 60a91b4Copy full SHA for 60a91b4
apps/settings/lib/Hooks.php
@@ -178,12 +178,17 @@ public function onChangeEmail(IUser $user, $oldMailAddress) {
178
if ($actor instanceof IUser) {
179
$subject = Provider::EMAIL_CHANGED_SELF;
180
if ($actor->getUID() !== $user->getUID()) {
181
+ // set via the OCS API
182
+ if ($this->config->getAppValue('settings', 'disable_activity.email_address_changed_by_admin', 'no') === 'yes') {
183
+ return;
184
+ }
185
$subject = Provider::EMAIL_CHANGED;
186
}
187
$text = $l->t('Your email address on %s was changed.', [$instanceUrl]);
188
$event->setAuthor($actor->getUID())
189
->setSubject($subject);
190
} else {
191
+ // set with occ
192
if ($this->config->getAppValue('settings', 'disable_activity.email_address_changed_by_admin', 'no') === 'yes') {
193
return;
194
0 commit comments