private function _getUserInfo($res, $uid, $puid) { loadcache('usergroups'); $space = UserUtils::getUserInfo($puid); if (empty($space)) { return WebUtils::makeErrorInfo_oldVersion($res, 'space_does_not_exist'); } $spacePro = UserUtils::getUserProfile($puid); $spaceCount = DzUserInfo::getCommonMemberCount($puid); $space = array_merge($space, $spacePro, $spaceCount); $listCount = (int) DzUserInfo::getUserPhotosHomeAlbumCount($puid); $res['flag'] = $uid == $puid ? 1 : 0; $res['is_black'] = (int) UserUtils::isBlacklist($uid, $puid) ? 1 : 0; $res['is_follow'] = (int) UserUtils::isFollow($uid, $puid); $res['isFriend'] = (int) UserUtils::isFriend($uid, $puid) ? 1 : 0; $res['icon'] = UserUtils::getUserAvatar($puid, $spacePro); $res['level_url'] = ''; $res['name'] = $space['username']; $res['email'] = $space['email']; $res['status'] = (int) UserUtils::getUserLoginStatus($puid); $res['gender'] = (int) UserUtils::getUserGender($puid, $spacePro); $res['email'] = $space['email']; $res['score'] = (int) $space['credits']; $res['credits'] = (int) $space['credits']; $res['gold_num'] = (int) $space['extcredits2']; $res['topic_num'] = (int) $this->_getHomeTopicNum($puid); $res['photo_num'] = (int) $listCount['nums']; $res['reply_posts_num'] = (int) DzUserInfo::getTopicsByUidWithPostCount($puid); $res['essence_num'] = (int) $space['digestposts']; $res['friend_num'] = (int) DzUserInfo::getFollowFriendsCount($puid); $res['follow_num'] = (int) DzUserInfo::getFollowedFriendsCount($puid); $res['level'] = (int) DzCommonUserList::getUserLevel($space['groupid']); $res['userTitle'] = UserUtils::getUserTitle($puid, $space); $repeatList = array(); foreach (UserUtils::getRepeatList($uid) as $user) { $repeatList[] = array('userName' => $user); } $res['body']['repeatList'] = $repeatList; $res['body']['profileList'] = $this->_getPersonalDataInfo($puid, $space); $res['body']['creditList'] = $this->_getStatisticalInformation($uid, $space); $res['body']['creditShowList'] = $this->_getStatisticalInforSet($uid, $space); return $res; }
private function _getAllUidList($uid, $page, $pageSize, $sortType, $longitude, $latitude, $radius) { switch ($sortType) { case 'default': return DzCommonUserList::_getRecommendUsersByDefault($uid, $page, $pageSize); break; case 'regdate': return DzCommonUserList::_getRecommendUsersByRegist($uid, $page, $pageSize); break; case 'lastvisit': return DzCommonUserList::_getRecommendUsersByLastVisit($uid, $page, $pageSize); break; case 'follower': return DzCommonUserList::_getRecommendUsersByFollower($uid, $page, $pageSize); break; case 'range': return DzCommonUserList::_getRecommendUsersByRange($uid, $page, $pageSize, $longitude, $latitude, $radius); break; default: break; } }