Skip to content

Commit

Permalink
Fix email 2FA users_email_unique error #61 (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
cawecoy authored Dec 7, 2024
1 parent bb05c83 commit 896a73a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Pages/TwoFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\ValidationException;
use Illuminate\Validation\Rule;
use Laravel\Fortify\Actions\ConfirmTwoFactorAuthentication;
use Laravel\Fortify\Actions\DisableTwoFactorAuthentication;
use Laravel\Fortify\Actions\EnableTwoFactorAuthentication;
Expand Down Expand Up @@ -251,7 +252,7 @@ private function getConfirmableFields(): array
'name' => 'email',
'label' => __('Email'),
'default' => $this->user->email,
'rules' => ['required', 'email'],
'rules' => ['required', 'email', Rule::unique('users', 'email')->ignore($this->user->id)],
];

break;
Expand Down

0 comments on commit 896a73a

Please sign in to comment.