From 603c6bffa277554151f95bb10f06121f467a755e Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 21 Nov 2019 10:40:21 +0800 Subject: [PATCH] =?UTF-8?q?auth2.Login=E4=B8=AD=EF=BC=8C=E6=9A=82=E6=97=B6?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=88=A9=E7=94=A8=E5=BE=97=E5=88=B0=E5=8F=97?= =?UTF-8?q?=E4=BF=A1=E4=BB=BB=E7=9A=84=E4=BF=A1=E6=81=AF=E6=9F=A5=E6=89=BE?= =?UTF-8?q?=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/auth2/auth2.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 3377d3e40..6d6bd558b 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -254,15 +254,16 @@ func Login(ctx *Context, authType, authID, authIDType, authSecret string) (authI } else { // 返回authBind中UserID为空表示只是认证,但本地没有记录,这种情况会返回临时TOKEN if authBindEx.UserHint != nil && authBindEx.UserID == "" { - 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() + // } } else if authBindEx.UserID != "" { user = userProvider.GetUser(authBindEx.UserID, UserIDID) }