Finish Hotfix-1
This commit is contained in:
@@ -87,13 +87,21 @@ class AuthLogic
|
|||||||
try {
|
try {
|
||||||
$phone = $this->sanitizePhone($feishuUserInfo['mobile'] ?? '');
|
$phone = $this->sanitizePhone($feishuUserInfo['mobile'] ?? '');
|
||||||
$email = $feishuUserInfo['enterprise_email'];
|
$email = $feishuUserInfo['enterprise_email'];
|
||||||
$user = User::where('corp_id', $feishuUserInfo['corp_id'])
|
// $user = User::where('corp_id', $feishuUserInfo['corp_id'])
|
||||||
->where(function($query) use ($phone, $email) {
|
// ->where(function($query) use ($phone, $email) {
|
||||||
$query->where('phone', $phone)
|
// $query->where('phone', $phone)
|
||||||
->orWhere('email', $email);
|
// ->orWhere('email', $email);
|
||||||
})
|
// })
|
||||||
|
// ->first();
|
||||||
|
$userByPhone = User::where('corp_id', $feishuUserInfo['corp_id'])
|
||||||
|
->where('phone', $phone)
|
||||||
|
->where('phone', '!=', '')
|
||||||
->first();
|
->first();
|
||||||
|
$userByEmail = User::where('corp_id', $feishuUserInfo['corp_id'])
|
||||||
|
->where('email', $email)
|
||||||
|
->where('email', '!=', '')
|
||||||
|
->first();
|
||||||
|
$user = $userByPhone ?: $userByEmail;
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// 获取编号
|
// 获取编号
|
||||||
$userSn = $this->getAvailableUserSn();
|
$userSn = $this->getAvailableUserSn();
|
||||||
|
|||||||
Reference in New Issue
Block a user