Skip to content

Commit

Permalink
Revert "Revert "Extract registered event and login to registered meth…
Browse files Browse the repository at this point in the history
…od" (#29875)"

This reverts commit 3ace0b9.
  • Loading branch information
taylorotwell authored Sep 5, 2019
1 parent 3ace0b9 commit 891817e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Foundation/Auth/RegistersUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ public function register(Request $request)
{
$this->validator($request->all())->validate();

event(new Registered($user = $this->create($request->all())));

$this->guard()->login($user);
$user = $this->create($request->all());

return $this->registered($request, $user)
?: redirect($this->redirectPath());
Expand All @@ -57,6 +55,8 @@ protected function guard()
*/
protected function registered(Request $request, $user)
{
//
event(new Registered($user));

$this->guard()->login($user);
}
}

0 comments on commit 891817e

Please sign in to comment.