Esempio n. 1
0
 /**
  * 获取联系人的信息
  * 
  * @access public
  * @param int $userId
  * @return array
  */
 public function getContactProfile($userId)
 {
     $userProfile = $this->userModel->get($userId);
     $userTagList = $this->userModel->getUserTagList($userId);
     foreach ($userTagList as &$value) {
         $value = '<span>#' . $value['tagName'] . '</span>';
     }
     $acctionList = $this->userModel->getAcctionList($userId);
     foreach ($acctionList as &$acctionIndex) {
         $acctionIndex = '<a href="">' . $acctionIndex . '</a>';
     }
     return array('id' => $userId, 'username' => $userProfile[0]['nickname'], 'phoneNum' => $userProfile[0]['phone_num'], 'userProfile' => $userProfile[0]['userProfile'], 'tagList' => implode(' ', $userTagList), 'acctionList' => implode(',', $acctionList));
 }