Пример #1
0
 /**
  * 批量获取用户基本信息
  * @return int code 操作码,0表示成功
  * @return array list 用户列表
  * @return int list[].id 用户ID
  * @return string list[].name 用户名字
  * @return string list[].from 用户来源
  * @return string msg 提示信息
  */
 public function getMultiBaseInfo()
 {
     $rs = array('code' => 0, 'msg' => '', 'list' => array());
     $domain = new Domain_User();
     foreach ($this->userIds as $userId) {
         $rs['list'][] = $domain->getBaseInfo($userId);
     }
     return $rs;
 }
Пример #2
0
 public function retrieveInfo()
 {
     $rs = array('code' => 0, 'msg' => '', 'info' => array());
     $method = $_SERVER['REQUEST_METHOD'];
     if ($method == 'GET') {
         $rs['code'] = 1;
         $rs['msg'] = T('Please Use POST Method');
         return $rs;
     }
     $domain = new Domain_User();
     $info = $domain->retrieveInfo($this->userId, $this->token);
     if (empty($info)) {
         $rs['code'] = 1;
         $rs['msg'] = T('Something wring');
         return $rs;
     }
     $rs['info'] = $info;
     return $rs;
 }