Daniel Supernault преди 2 години
родител
ревизия
796e374040
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  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();