Skip to content

Commit

Permalink
修复第三方帐号注册的时候邮箱重复问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ideal committed Jun 19, 2015
1 parent d15dd58 commit 5387157
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions upload/src/applications/u/service/PwThirdLoginService.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,14 @@ public function getUserInfo($platform, $accesstoken, array $extra)
);
} else {
$userinfo[0] = true;
$uid = md5($result['figureurl_qq_2']);
$userinfo[1] = array(
'uid' => md5($result['figureurl_qq_2']),
'uid' => $uid,
'username' => $result['nickname'],
'gender' => $result['gender'] == '' ? 0 : 1,
'avatar' => $result['figureurl_qq_2'],
'type' => $platform,
'email' => '[email protected]',
'email' => 'example'.substr($uid, 0, 10).'@qq.com',
);
}
return $userinfo;
Expand All @@ -208,7 +209,7 @@ public function getUserInfo($platform, $accesstoken, array $extra)
'gender' => $result['gender'] == 'm' ? 0 : 1,
'avatar' => $result['avatar_large'],
'type' => $platform,
'email' => '[email protected]',
'email' => 'example'.substr($result['uid'], 0, 10).'@weibo.com',
);
}
return $userinfo;
Expand Down

0 comments on commit 5387157

Please sign in to comment.