How to remove automatic login after registering?
I've commented the following line from the RegisterUsers file:
public function register(Request $request)
{
$validator = $this->validator($request->all());
if ($validator->fails()) {
$this->throwValidationException(
$request, $validator
);
}
//Linha comentada
//Auth::guard($this->getGuard())->login($this->create($request->all()));
return redirect($this->redirectPath());
}
This prevented you from logging in but does not register the user.
I tried to leave only create:
Auth::guard($this->getGuard())->create($request->all());
But it gives the error: 'Call to undefined method Illuminate \ Auth \ SessionGuard :: create ()'.
What do I do?