修复登录时无法正常获取钉钉用户信息的问题
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
1b43d00390
commit
e8248a95e0
@ -71,9 +71,13 @@ class Oauth extends BasicApi
|
||||
if (!$user['errcode']) {
|
||||
$result = $app->user->getUseridByUnionid($user['user_info']['unionid']);
|
||||
if (!$result['errcode']) {
|
||||
$user['user_info']['avatar'] = $result['avatar'];
|
||||
$user['user_info']['mobile'] = $result['mobile'];
|
||||
$user['user_info']['email'] = $result['email'];
|
||||
$userId = $result['userid'];
|
||||
$userInfo = $app->user->get($userId, $lang = null);
|
||||
if (!$user['errcode']) {
|
||||
$user['user_info']['avatar'] = $userInfo['avatar'];
|
||||
$user['user_info']['mobile'] = $userInfo['mobile'];
|
||||
$user['user_info']['email'] = $userInfo['email'];
|
||||
}
|
||||
}
|
||||
Member::dingtalkLogin($user['user_info']);
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user