AccountAction::privacy PHP Method

privacy() public method

隐私设置页面
public privacy ( )
    public function privacy()
    {
        $user_privacy = D('UserPrivacy')->getUserSet($this->mid);
        $this->assign('user_privacy', $user_privacy);
        $user = model('User')->getUserInfo($this->mid);
        $this->setTitle(L('PUBLIC_PRIVACY'));
        $this->setKeywords(L('PUBLIC_PRIVACY'));
        // 获取用户职业信息
        $userCategory = model('UserCategory')->getRelatedUserInfo($this->mid);
        $userCateArray = array();
        if (!empty($userCategory)) {
            foreach ($userCategory as $value) {
                $user['category'] .= '<a href="#" class="link btn-cancel"><span>' . $value['title'] . '</span></a>&nbsp;&nbsp;';
            }
        }
        $user_tag = model('Tag')->setAppName('User')->setAppTable('user')->getAppTags(array($this->mid));
        $this->setDescription(t($user['category'] . $user['location'] . ',' . implode(',', $user_tag[$this->mid]) . ',' . $user['intro']));
        $this->display();
    }