Laravel Auth Register, Prevent automatic login -
i developing app manage users. need access auth/register logged in users. default auth redirecting home page.
it seems after registration, auth automatically doing ::attempt.
how can prevent it?
assuming use registersusers
(or authenticatesandregistersusers
) trait in controller can override postregister
method , not log user in. can see original method here
without logging be:
public function postregister(request $request) { $validator = $this->validator($request->all()); if ($validator->fails()) { $this->throwvalidationexception( $request, $validator ); } return redirect($this->redirectpath()); }
Comments
Post a Comment