소스 검색

bugfix: 移网bug

kevinElken 8 달 전
부모
커밋
7a0e5c4593
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      common/helpers/user/Info.php

+ 4 - 3
common/helpers/user/Info.php

@@ -344,10 +344,11 @@ class Info {
                 $netParentBaseInfo = self::baseInfo($baseInfo['CON_UID']);
                 $networkParent = UserNetwork::findOneAsArray('USER_ID=:USER_ID', [':USER_ID' => $userId]);
                 //$baseInfo['CON_UID'] = $baseInfo['CON_UID'];
-                $baseInfo['CON_USER_NAME'] = $netParentBaseInfo['USER_NAME'];
-                $baseInfo['CON_REAL_NAME'] = $netParentBaseInfo['REAL_NAME'];
-                $baseInfo['LOCATION'] = $networkParent['RELATIVE_LOCATION'];
+                $baseInfo['CON_USER_NAME'] = $netParentBaseInfo['USER_NAME'] ?? '';
+                $baseInfo['CON_REAL_NAME'] = $netParentBaseInfo['REAL_NAME'] ?? '';
+                $baseInfo['LOCATION'] = $networkParent['RELATIVE_LOCATION'] ?? 1;
             }
+
             if (isset($baseInfo['REC_UID']) && $baseInfo['REC_UID']) {
                 // 推荐网上级
                 //$relationParentUserInfo = UserRelation::getFirstParentUserInfo($userId);