Skip to content

Commit 3b7b59b

Browse files
authored
Merge pull request #68 from DarthShmev/1.x
Fix flawed logic in the UpdateUserProfileInformation action
2 parents 85a7dfb + 8d02eda commit 3b7b59b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

stubs/UpdateUserProfileInformation.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,21 @@ public function update($user, array $input)
3030
],
3131
])->validateWithBag('updateProfileInformation');
3232

33-
if ($input['email'] !== $user->email &&
34-
$user instanceof MustVerifyEmail) {
33+
if ($input['email'] !== $user->email && $user instanceof MustVerifyEmail) {
34+
$user->forceFill([
35+
'name' => $input['name'],
36+
'email' => $input['email'],
37+
'email_verified_at' => null,
38+
])->save();
39+
3540
$user->sendEmailVerificationNotification();
41+
42+
return;
3643
}
3744

3845
$user->forceFill([
3946
'name' => $input['name'],
4047
'email' => $input['email'],
41-
'email_verified_at' => null,
4248
])->save();
4349
}
4450
}

0 commit comments

Comments
 (0)