test
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user