Skip to content

Commit

Permalink
fix: 完善OAuth User参数获取 (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjfz committed Oct 14, 2022
1 parent 0fb9a3c commit 5058451
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Providers/OpenWeWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,16 @@ protected function getUserByTicket(string $userTicket): array
protected function mapUserToObject(array $user): Contracts\UserInterface
{
return new User($this->detailed ? [
Contracts\ABNF_ID => $user['userid'] ?? null,
Contracts\ABNF_ID => $user['userid'] ?? $user['UserId'] ?? null,
Contracts\ABNF_NAME => $user[Contracts\ABNF_NAME] ?? null,
Contracts\ABNF_AVATAR => $user[Contracts\ABNF_AVATAR] ?? null,
'gender' => $user['gender'] ?? null,
'corpid' => $user['corpid'] ?? null,
'corpid' => $user['corpid'] ?? $user['CorpId'] ?? null,
'open_userid' => $user['open_userid'] ?? null,
'qr_code' => $user['qr_code'] ?? null,
] : [
Contracts\ABNF_ID => $user['userid'] ?? $user['UserId'] ?? $user['OpenId'] ?? null,
'corpid' => $user['corpid'] ?? null,
Contracts\ABNF_ID => $user['userid'] ?? $user['UserId'] ?? $user['OpenId'] ?? $user['openid'] ?? null,
'corpid' => $user['CorpId'] ?? null,
'open_userid' => $user['open_userid'] ?? null,
]);
}
Expand Down

0 comments on commit 5058451

Please sign in to comment.