Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Jan 26, 2024
1 parent da16f7c commit f59cd76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Models\User;
use Cone\Root\Http\Controllers\Controller;
use Illuminate\Auth\Events\PasswordReset;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
Expand Down Expand Up @@ -45,7 +46,7 @@ public function reset(Request $request): RedirectResponse
function (User $user, string $password): void {
$this->resetPassword($user, $password);

if (! $user->hasVerifiedEmail()) {
if ($user instanceof MustVerifyEmail && ! $user->hasVerifiedEmail()) {
$user->markEmailAsVerified();
}
}
Expand Down

0 comments on commit f59cd76

Please sign in to comment.