Answer the question
In order to leave comments, you need to log in
How to disable authorization after registering laravel 5.3?
All the best! In general, email confirmation is required, I sent a token with a link to the route where it will change the status of the added user from false to true, in the registration controller from the Laravel package, but after adding a new user, Lara automatically authorizes the user, which is not and is not necessary! let at atorizatsiya check I will make on the status false say that would confirm. So where exactly to disable authorization after registration?
Answer the question
In order to leave comments, you need to log in
Why not just add a middleware with a status check and if not confirmed, then send it to a page asking you to confirm the registration or send the code again?
Here is the solution in /Foundation/Auth/RegistersUsers.php
public function register(Request $request)
{
$this->validator($request->all())->validate();
event(new Registered($user = $this->create($request->all())));
$this->guard()->login($user); // DELETE THIS LINE!!!
return $this->registered($request, $user) ?: redirect($this->redirectPath());
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question