From abc738a532e356f2cc7773584f97232abc847166 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 21 Dec 2018 12:54:14 -0700 Subject: [PATCH] Update AuthLogin listener --- app/Listeners/AuthLogin.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Listeners/AuthLogin.php b/app/Listeners/AuthLogin.php index 6d3f9e2db..a69f86f81 100644 --- a/app/Listeners/AuthLogin.php +++ b/app/Listeners/AuthLogin.php @@ -25,6 +25,11 @@ class AuthLogin public function handle($event) { $user = $event->user; + + if(!$user) { + return; + } + if (empty($user->settings)) { DB::transaction(function() use($user) { UserSetting::firstOrCreate([