diff --git a/app/Models/User.php b/app/Models/User.php index f9b774d7..40eaa53e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -392,12 +392,12 @@ class User extends Model implements AuthorizableContract, AuthenticatableContrac */ public static function create(array $attributes = [], ?self $inviter = null): self { - $user = static::query()->create($attributes); - if ($inviter === null) { $inviter = static::find(1); } + $user = static::query()->create($attributes); + // 邀请人的深度 $depth = (int) $inviter?->userInfo?->depth;