Browse Source

update: check user

tokumeikoi 2 năm trước cách đây
mục cha
commit
2073727a0a
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      app/Console/Commands/CheckUser.php

+ 3 - 1
app/Console/Commands/CheckUser.php

@@ -43,7 +43,9 @@ class CheckUser extends Command
 
     private function resetExpiredUserPlan($day = 14)
     {
-        User::where('expired_at', '<', $day * 86400)->update([
+        User::where('expired_at', '<', $day * 86400)
+            ->whereNotNull('expired_at')
+            ->update([
             'plan_id' => NULL,
             'group_id' => NULL
         ]);