Laravel user registration and reset password default behavior

Posted 9 months ago by hasusozam

In Laravel 5.7 we have this new feature for email verification, the thing is that it doesn't "match" with the current Laravel registration and reset password default behavior. I had to add middleware('verified') to the /home route so it would be protected and only verified users could access, it works, but the thing is that Laravel internally is calling $this->guard()->login($user), so the user is actually logged in, even without the email being verified, and what happens is that the navigation bar still shows his username and the dropdown with his actions.

I was wondering, how to remove that default behavior, instead of logging the user in when he registers I want to show only the email verification message. In the reset password I want to redirect the user to the login page instead of logging automatically.


Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.