summaryrefslogtreecommitdiffstats
path: root/settings/Hooks.php
diff options
context:
space:
mode:
Diffstat (limited to 'settings/Hooks.php')
-rw-r--r--settings/Hooks.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/settings/Hooks.php b/settings/Hooks.php
index c8fc9d6a8c3..daf3a40cf1b 100644
--- a/settings/Hooks.php
+++ b/settings/Hooks.php
@@ -140,6 +140,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')