diff --git a/WeixinAuth.php b/WeixinAuth.php index 3138b69..153b1d8 100644 --- a/WeixinAuth.php +++ b/WeixinAuth.php @@ -80,8 +80,7 @@ protected function initUserAttributes() /** * get UserInfo - * @return [] - * @see http://open.weibo.com/wiki/2/users/show + * @return array */ public function getUserInfo() { @@ -93,8 +92,7 @@ public function getUserInfo() */ public function getOpenid() { - $attributes = $this->getUserAttributes(); - return $attributes['openid']; + return $this->getAccessToken()->getParam('openid'); } protected function defaultName()