Browse Source

Update UserObserver

Daniel Supernault 2 năm trước cách đây
mục cha
commit
796e374040
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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();