Skip to content

Commit

Permalink
UserManager: we only update email if its actually changed
Browse files Browse the repository at this point in the history
Was getting UserEmailChanged event
  • Loading branch information
dpslwk committed May 26, 2019
1 parent b273d22 commit 1f88fcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/HMS/User/UserManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function updateFromRequest(User $user, Request $request): User
$user->setLastname($request['lastname']);
}

if ($request['email']) {
if ($request['email'] && $request['email'] != $user->getEmail()) {
$oldEmail = $user->getEmail();
$user->setEmail($request['email']);
if ($user instanceof MustVerifyEmail) {
Expand Down

0 comments on commit 1f88fcd

Please sign in to comment.