From 6d1e9c36de09b34109ccc0f550053751e2b06656 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Fri, 12 Aug 2022 15:34:44 +0800 Subject: [PATCH] dd --- business/auth2/auth2.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index e449a43ca..7b31bd547 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -266,15 +266,15 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string if authBindEx.UserHint != nil && authBindEx.UserID == "" { globals.SugarLogger.Debug("进入") // 利用得到受信任的信息查找用户 - // if authBindEx.UserHint.Mobile != "" { - // user = userProvider.GetUser(authBindEx.UserHint.Mobile, UserIDMobile) - // } - // if user == nil && authBindEx.UserHint.Email != "" { - // user = userProvider.GetUser(authBindEx.UserHint.Email, UserIDEmail) - // } - // if user != nil { - // authBindEx.UserID = user.GetID() - // } + if authBindEx.UserHint.Mobile != "" { + user = userProvider.GetUser(authBindEx.UserHint.Mobile, UserIDMobile) + } + if user == nil && authBindEx.UserHint.Email != "" { + user = userProvider.GetUser(authBindEx.UserHint.Email, UserIDEmail) + } + if user != nil { + authBindEx.UserID = user.GetID() + } if user2 := userProvider.GetUser(authBindEx.UserHint.Email, UserIDMobile); user2 != nil { user = user2 }