public function relationship()
{
// 获取用户信息
$user_info = model('User')->getUserInfo($this->uid);
// 用户为空,则跳转用户不存在
if (empty($user_info)) {
$this->error(L('PUBLIC_USER_NOEXIST'));
}
// 个人空间头部
$this->_top();
// 判断隐私设置
$userPrivacy = $this->privacy($this->uid);
if ($userPrivacy['space'] !== 1) {
$key = t($_REQUEST['follow_key']);
$follower_list = model('Union')->getFriendsList($this->uid, $key);
$this->assign('follow_key', $key);
$this->assign('jsonKey', json_encode($key));
$fids = getSubByKey($follower_list['data'], 'fid');
if ($fids) {
$uids = array_merge($fids, array($this->uid));
} else {
$uids = array($this->uid);
}
// 获取用户用户组信息
$this->_assignFollowState($uids);
$this->_assignUserInfo($uids);
$this->_assignUserProfile($uids);
$this->_assignUserTag($uids);
$this->_assignUserCount($fids);
$this->assign('follower_list', $follower_list);
} else {
$this->_assignUserInfo($this->uid);
}
$this->assign('userPrivacy', $userPrivacy);
$this->display();
}