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([