Explorar o código

Update AuthLogin listener

Daniel Supernault %!s(int64=4) %!d(string=hai) anos
pai
achega
ef184a2cb4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Listeners/AuthLogin.php

+ 1 - 1
app/Listeners/AuthLogin.php

@@ -42,7 +42,7 @@ class AuthLogin
     protected function userProfile($user)
     {
         if (empty($user->profile)) {
-            if($user->created_at->lt(now()->subDays(1))) {
+            if($user->created_at->lt(now()->subDays(1)) && empty($user->status)) {
                 $p = Profile::withTrashed()->whereUserId($user->id)->first();
                 if($p) {
                     $p->restore();