summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
Diffstat (limited to 'settings')
-rw-r--r--settings/Hooks.php6
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')