This commit is contained in:
richboo111
2022-08-11 18:15:21 +08:00
parent 4503993016
commit b7db80a5af
2 changed files with 4 additions and 3 deletions

View File

@@ -263,6 +263,7 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string
} else {
// 返回authBind中UserID为空表示只是认证但本地没有记录这种情况会返回临时TOKEN
if authBindEx.UserHint != nil && authBindEx.UserID == "" {
globals.SugarLogger.Debug("进入")
// 利用得到受信任的信息查找用户
// if authBindEx.UserHint.Mobile != "" {
// user = userProvider.GetUser(authBindEx.UserHint.Mobile, UserIDMobile)
@@ -273,7 +274,7 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string
// if user != nil {
// authBindEx.UserID = user.GetID()
// }
//if user3:=api.DingDingAPI.GetUserID(a)
if user2 := userProvider.GetUser(authBindEx.UserHint.Email, UserIDMobile); user2 != nil {
user = user2
}

View File

@@ -80,9 +80,9 @@ func (a *DefAuther) UnionFindAuthBind(curAuthType, curAuthTypeID string, unionAu
dao.UpdateEntity(db, authBind, "TypeID")
}
} else if dao.IsNoRowsError(err) { // 直接找不到尝试unionID
if unionID != "" || openID != "" { // 且有unionID
if unionID != "" { // 且有unionID
var authBindList []*model.AuthBind
authBindList, err = dao.GetUserBindAuthInfo(db, "", model.AuthBindTypeAuth, unionAuthTypeList, openID, unionID, nil)
authBindList, err = dao.GetUserBindAuthInfo(db, "", model.AuthBindTypeAuth, unionAuthTypeList, "", unionID, nil)
if err != nil {
return nil, err
}