diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-05-28 18:25:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-28 18:25:09 +0100 |
commit | caccb9ca9c03fb89b8526d97b724fbb68d9071e8 (patch) | |
tree | b070a4e10709b27182d1b26d54042ee028fe8d6c /settings | |
parent | 4f2b26d24660d07ee77e71bcf9e133da0467cd89 (diff) | |
parent | 7ef6f065ca3dd05ffea46c7fe039938e6ace43e1 (diff) | |
download | nextcloud-server-caccb9ca9c03fb89b8526d97b724fbb68d9071e8.tar.gz nextcloud-server-caccb9ca9c03fb89b8526d97b724fbb68d9071e8.zip |
Merge pull request #5126 from nextcloud/setting-the-same-email-shouldnt-trigger-activity
Don't trigger activity when the email didn't change
Diffstat (limited to 'settings')
-rw-r--r-- | settings/Hooks.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/settings/Hooks.php b/settings/Hooks.php index 2d8b17ebfd9..9addaea5a91 100644 --- a/settings/Hooks.php +++ b/settings/Hooks.php @@ -117,6 +117,12 @@ class Hooks { * @throws \BadMethodCallException */ public function onChangeEmail(IUser $user, $oldMailAddress) { + + if ($oldMailAddress === $user->getEMailAddress()) { + // Email didn't really change, so don't create activities and emails + return; + } + $event = $this->activityManager->generateEvent(); $event->setApp('settings') ->setType('personal_settings') |