F
Filamentβ€’5w ago
Vp

email verification and canAccessPanel problem

I have enable ->emailVerification() on my panel provider, and implements MustVerifyEmail and FilamentUser on my User model. When I return $this->hasVerifiedEmail() from canAccessPanel() it shows 403 instead of email-verification page, when I return only true it display the page correctly. What should I need to do to resolve this, I want to use hasVerifiedEmail in the canAccessPanel
public function canAccessPanel(Panel $panel): bool
{
return true;
// return $this->hasVerifiedEmail();
}
public function canAccessPanel(Panel $panel): bool
{
return true;
// return $this->hasVerifiedEmail();
}
Filament version 4.1.9
No description
No description
Solution:
emailVerification() already check what I want, so closing this. thanks for your quick reply πŸ‘
Jump to solution
3 Replies
toeknee
toekneeβ€’5w ago
So you want to show the re-send page instead to verify the email again if they haven't clicked the link?
LeandroFerreira
LeandroFerreiraβ€’5w ago
I think MustVerifyEmail requires panel access to validate the link. You don't need to use hasVerifiedEmail in canAccessPanel
Solution
Vp
Vpβ€’5w ago
emailVerification() already check what I want, so closing this. thanks for your quick reply πŸ‘

Did you find this page helpful?