This commit is contained in:
苏尹岚
2021-04-16 18:03:05 +08:00
parent 19e5f5c140
commit 81ed9d41be
2 changed files with 0 additions and 7 deletions

View File

@@ -325,7 +325,6 @@ func AddAuthBind(user IUser, newAuthInfo *AuthInfo) (err error) {
return ErrInternalErrror
}
if !newAuthInfo.IsUserEmpty() {
globals.SugarLogger.Debugf("AddAuthBind user:33333333333333333333333 %v",)
return ErrAuthTypeAlreadyExist
}
RemoveUserInfo(newAuthInfo.Token)
@@ -336,12 +335,9 @@ func AddAuthBind(user IUser, newAuthInfo *AuthInfo) (err error) {
} else {
if handler := authers[newAuthInfo.AuthBindInfo.Type]; handler != nil {
newAuthInfo.AuthBindInfo.UserID = user.GetID()
globals.SugarLogger.Debugf("AddAuthBind user:111111111111111111111111111", )
handler.UnbindAuth(user.GetID(), newAuthInfo.GetAuthType(), newAuthInfo.GetAuthTypeID(), user.GetName())
globals.SugarLogger.Debugf("AddAuthBind user:2222222222222222222222222 %v", utils.Format4Output(newAuthInfo.AuthBindInfo,true))
err = handler.AddAuthBind(newAuthInfo.AuthBindInfo, user.GetName())
} else {
globals.SugarLogger.Debugf("AddAuthBind user:444444444444444444444444", )
err = ErrIllegalAuthType
}
}