2
How to remove automatic login after registering?
I 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 logging in but tbm does not register the user.
I tried to let you create:
Auth::guard($this->getGuard())->create($request->all());
However, it gives the error: 'Call to Undefined method Illuminate Auth Sessionguard::create()'.
What I do?
The method
create
is part of your controller, not classAuth
.– Rodrigo Rigotti