Skip to content

Commit 97e0e53

Browse files
authored
Merge pull request joomla#45276 from richard67/5.2-dev-upmerge-2025-04-03
[5.2] Upmerge 2025-04-03
2 parents 5037647 + 6be0f07 commit 97e0e53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libraries/src/User/User.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,11 @@ public function save($updateOnly = false)
771771
}
772772
}
773773

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+
774779
// Fire the onUserBeforeSave event.
775780
$dispatcher = Factory::getApplication()->getDispatcher();
776781
PluginHelper::importPlugin('user', null, true, $dispatcher);

0 commit comments

Comments
 (0)