Answer the question
In order to leave comments, you need to log in
Laravel 5.4 how to check user activation in standard login controller and add custom error?
I want to validate the 'activated' field of the user model before authorizing it and throw a custom error "Your account is not activated". I rummaged through the standard AuthenticatesUser.php trait, but didn't find a better solution than rewriting half of the trait.
How can this be implemented?
Answer the question
In order to leave comments, you need to log in
In your case, it is enough to reassign the postLogin function, which actually authorizes the user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question