We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5037647 + 6be0f07 commit 97e0e53Copy full SHA for 97e0e53
libraries/src/User/User.php
@@ -771,6 +771,11 @@ public function save($updateOnly = false)
771
}
772
773
774
+ // Unset the activation token, if the mail address changes - that affects both, activation and PW resets
775
+ if ($this->email !== $oldUser->email && $this->id !== 0 && !empty($this->activation) && !$this->block) {
776
+ $table->activation = '';
777
+ }
778
+
779
// Fire the onUserBeforeSave event.
780
$dispatcher = Factory::getApplication()->getDispatcher();
781
PluginHelper::importPlugin('user', null, true, $dispatcher);
0 commit comments