Explorar o código

Update UserObserver

Daniel Supernault %!s(int64=2) %!d(string=hai) anos
pai
achega
796e374040
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/Observers/UserObserver.php

+ 4 - 0
app/Observers/UserObserver.php

@@ -26,6 +26,10 @@ class UserObserver
 			return;
 		}
 
+        if(Profile::whereUsername($user->username)->exists()) {
+            return;
+        }
+
 		if (empty($user->profile)) {
 			$profile = DB::transaction(function() use($user) {
 				$profile = new Profile();