Skip to content

Commit

Permalink
fix getOpenid()
Browse files Browse the repository at this point in the history
  • Loading branch information
xjflyttp committed Mar 15, 2016
1 parent 2f49744 commit e783b6b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions WeixinAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ protected function initUserAttributes()

/**
* get UserInfo
* @return []
* @see http://open.weibo.com/wiki/2/users/show
* @return array
*/
public function getUserInfo()
{
Expand All @@ -93,8 +92,7 @@ public function getUserInfo()
*/
public function getOpenid()
{
$attributes = $this->getUserAttributes();
return $attributes['openid'];
return $this->getAccessToken()->getParam('openid');
}

protected function defaultName()
Expand Down

0 comments on commit e783b6b

Please sign in to comment.