Issue
I have written code for email verification. I want to change my login controller behavior so that it will only allow verified users only.
I have status field in database that will store user is verified or not by storing 0/1. Now on login request I have to check email, password, as well as status code is equal to 1. If verified, the user will be redirected to dashboard otherwise redirect to login with error message.
I have done all email verification things.
Please let me know what inputs you want.
Solution
Update your LoginController
need to write following function there
protected function authenticated($request, $user){
if(!$user->is_active){
//logic here
}
}
In above example, is_active
is your table attribute where you have user status...!!
Answered By - Ramzan Mahmood
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.