F
Filamentβ€’7mo ago
mohdaftab

Send Email Verification to user

Hello, How do I prevent unverified email login to the Panel please and prompt them for verifying email address please? I used this in User Model public function canAccessPanel(Panel $panel): bool { return true && $this->hasVerifiedEmail(); } also using ->emailVerification() with $panel in AdminPanelProvider it doesn't let users login and says "These credentials do not match our records." I need this to prompt them from verifying email address or send the verification email without the prompt and show the message please verify your email address instead of "These credentials do not match our records." Thank you
3 Replies
Lara Zeus
Lara Zeusβ€’7mo ago
it should work add ->emailVerification() and implements FilamentUser, MustVerifyEmail in user model and that it no need for return true && $this->hasVerifiedEmail();
mohdaftab
mohdaftabβ€’7mo ago
perfect, thank you works perfectly @Lara Zeus please let me know where is it mentioned in the documentation, just for info please it is a Laravel thing, found it. Thank you
Lara Zeus
Lara Zeusβ€’7mo ago
yes its laravel πŸ™‚ πŸ‘