afa 8 달 전
부모
커밋
d771c72ff8
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      application/common/model/UserModel.php

+ 1 - 2
application/common/model/UserModel.php

@@ -110,8 +110,7 @@ class UserModel extends Model
     public static function updateUserLevel(int $uid, int $parentId)
     {
         if (!empty($parentId)) {
-            $paths  = UserPathModel::where('user_id', $parentId)->order('distance', 'asc')->column('parent_id');
-            $paths[]= $parentId;
+            $paths  = UserPathModel::where('user_id', $uid)->order('distance', 'asc')->column('parent_id');
             foreach ($paths as $item) 
             {
                 $parent = self::where('id', $item)->find();