I'm using Laravel Version 7, and in my users' table, I have an additional field called "deactivated" to deactivate a user. However, I don't want a deactivated user to be able to send himself a Password Reset E-Mail via the built-in function. So, how can I check if the user is deactivated before a Password Reset E-Mail is sent?
Asked
Active
Viewed 88 times
3
-
if account deactived then which value contains the `deactivated` field? – STA Jul 19 '20 at 16:57
-
2See the sendPasswordResetNotification method of your user model. Check for deactivated there, and through a custom error you can handle accordingly. – Kurt Friars Jul 19 '20 at 18:45
-
Thanks Kurt , that worked – q55awr Jul 21 '20 at 18:46