ProfileAction::_sidebar PHP Method

_sidebar() public method

个人主页右侧
public _sidebar ( )
    public function _sidebar()
    {
        // 判断用户是否已认证
        $isverify = D('user_verified')->where('verified=1 AND uid=' . $this->uid)->find();
        if ($isverify) {
            $this->assign('verifyInfo', $isverify['info']);
        }
        // 判断访问用户是否已认证
        if ($this->mid == $this->uid) {
            $isMidVerify = true;
        } else {
            $isMidVerify = D('user_verified')->where('verified=1 AND uid=' . $this->mid)->find();
            $isMidVerify = (bool) $isMidVerify;
        }
        $this->assign('isMidVerify', $isMidVerify);
        // 加载用户标签信息
        $this->_assignUserTag(array($this->uid));
        // 加载关注列表
        $sidebar_following_list = model('Follow')->getFollowingList($this->uid, null, 12);
        $this->assign('sidebar_following_list', $sidebar_following_list);
        // dump($sidebar_following_list);exit;
        // 加载粉丝列表
        $sidebar_follower_list = model('Follow')->getFollowerList($this->uid, 12);
        $this->assign('sidebar_follower_list', $sidebar_follower_list);
        // 加载用户信息
        $uids = array($this->uid);
        $followingfids = getSubByKey($sidebar_following_list['data'], 'fid');
        $followingfids && ($uids = array_merge($uids, $followingfids));
        $followerfids = getSubByKey($sidebar_follower_list['data'], 'fid');
        $followerfids && ($uids = array_merge($uids, $followerfids));
        $this->_assignUserInfo($uids);
    }