Skip to content

Commit ae385dc

Browse files
committed
对返回的ID标记为wechat
1 parent b07292a commit ae385dc

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/oauth/OAuth.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ class OAuth extends OAuth2
3939
*/
4040
public $useOpenId = true;
4141

42+
/**
43+
* @inheritdoc
44+
*/
45+
protected function defaultName()
46+
{
47+
return 'wechat';
48+
}
49+
50+
/**
51+
* @inheritdoc
52+
*/
53+
protected function defaultTitle()
54+
{
55+
return '微信';
56+
}
57+
4258
/**
4359
* 初始化组件
4460
*/
@@ -155,7 +171,7 @@ public function getOpenId()
155171
*/
156172
protected function initUserAttributes()
157173
{
158-
return $this->api('sns/userinfo', 'GET',[
174+
return $this->api('sns/userinfo', 'GET', [
159175
//'lang'=>
160176
]);
161177
}

0 commit comments

Comments
 (0)