예제 #1
0
 /**
  * 获取当前用户的个人信息
  *
  * @param Request           $request
  * @param string|integer    $user_id
  * @return array
  */
 private function obtainCurrentUserInfo($request, $user_id)
 {
     return valueOrFail(\App\Weixin_User::getFullyUserInfo($user_id));
 }
예제 #2
0
 /**
  * 获取指定ID的部分用户信息
  *
  * @param
  * bool $user_id 当前用户ID
  *
  * @return array
  */
 public static function getShortlyUserInfoByUser($user_id)
 {
     /* 获取用户信息 */
     $info = Weixin_User::getFullyUserInfo($user_id);
     return ['name' => $info->user_nickname, 'avatar' => $info->user_avatar, 'user_id' => $info->user_id];
 }