Ver Fonte

bugfix: 移网bug

kevinElken há 9 meses atrás
pai
commit
7a0e5c4593
1 ficheiros alterados com 4 adições e 3 exclusões
  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']);
                 $netParentBaseInfo = self::baseInfo($baseInfo['CON_UID']);
                 $networkParent = UserNetwork::findOneAsArray('USER_ID=:USER_ID', [':USER_ID' => $userId]);
                 $networkParent = UserNetwork::findOneAsArray('USER_ID=:USER_ID', [':USER_ID' => $userId]);
                 //$baseInfo['CON_UID'] = $baseInfo['CON_UID'];
                 //$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']) {
             if (isset($baseInfo['REC_UID']) && $baseInfo['REC_UID']) {
                 // 推荐网上级
                 // 推荐网上级
                 //$relationParentUserInfo = UserRelation::getFirstParentUserInfo($userId);
                 //$relationParentUserInfo = UserRelation::getFirstParentUserInfo($userId);