Browse Source

Update AuthLogin listener

Daniel Supernault 6 năm trước cách đây
mục cha
commit
abc738a532
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      app/Listeners/AuthLogin.php

+ 5 - 0
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([