This commit is contained in:
richboo111
2022-08-12 11:51:10 +08:00
parent d378b5e469
commit 00ad570041

View File

@@ -178,7 +178,7 @@ func createAuthInfo(user IUser, authBindInfo *AuthBindEx) (authInfo *AuthInfo) {
authInfo.ExpiresAt = time.Now().Add(expireDuration).Unix()
globals.SugarLogger.Debugf("createAuthInfo authInfo:%s", utils.Format4Output(authInfo, true))
}
//SetUserInfo(token, authInfo, expireDuration)
SetUserInfo(token, authInfo, expireDuration)
return authInfo
}
@@ -275,13 +275,9 @@ 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.AuthID2, "auth_id2"); user2 != nil {
if user2 := userProvider.GetUser(authBindEx.UserHint.Email, UserIDMobile); user2 != nil {
user = user2
}
//if user2 := userProvider.GetUser(authBindEx.UserHint.Email, UserIDMobile); user2 != nil {
// user = user2
//}
globals.SugarLogger.Debug("user检测1=============", user)
} else if authBindEx.UserID != "" {
user = userProvider.GetUser(authBindEx.UserID, UserIDID)