mirror of
https://github.com/nextcloud/server.git
synced 2026-02-24 02:11:51 -05:00
check disable_activity.email_address_changed_by_admin when email is changed by admin via the OCS API
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
parent
d49c7a3bdc
commit
df583faba3
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue