From 3ace0b9f52f3b9604e47e9d498de5b7a838da0f5 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Thu, 5 Sep 2019 15:14:54 -0400 Subject: [PATCH] Revert "Extract registered event and login to registered method" (#29875) This reverts commit 708975a01d31c0c50311322935b3efa4436b13d5. --- src/Illuminate/Foundation/Auth/RegistersUsers.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Foundation/Auth/RegistersUsers.php b/src/Illuminate/Foundation/Auth/RegistersUsers.php index 1d2b32225cfd..f3238f28b645 100644 --- a/src/Illuminate/Foundation/Auth/RegistersUsers.php +++ b/src/Illuminate/Foundation/Auth/RegistersUsers.php @@ -30,7 +30,9 @@ public function register(Request $request) { $this->validator($request->all())->validate(); - $user = $this->create($request->all()); + event(new Registered($user = $this->create($request->all()))); + + $this->guard()->login($user); return $this->registered($request, $user) ?: redirect($this->redirectPath()); @@ -55,8 +57,6 @@ protected function guard() */ protected function registered(Request $request, $user) { - event(new Registered($user)); - - $this->guard()->login($user); + // } }