- up
This commit is contained in:
@@ -123,9 +123,9 @@ func createAuthInfo(user IUser, authBindInfo *AuthBindEx) (authInfo *AuthInfo) {
|
||||
}
|
||||
if user != nil {
|
||||
authInfo.UpdateByIUser(user)
|
||||
globals.SugarLogger.Debugf("CreateAuthInfo id:%s, id2:%s, authInfo:%s", authInfo.GetID(), authInfo.GetID2(), authInfo.GetMobile(), utils.Format4Output(authInfo, true))
|
||||
globals.SugarLogger.Debugf("createAuthInfo id:%s, id2:%s, mobile:%s, authInfo:%s", authInfo.GetID(), authInfo.GetID2(), authInfo.GetMobile(), utils.Format4Output(authInfo, true))
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("CreateAuthInfo authInfo:%s", utils.Format4Output(authInfo, true))
|
||||
globals.SugarLogger.Debugf("createAuthInfo authInfo:%s", utils.Format4Output(authInfo, true))
|
||||
}
|
||||
SetUserInfo(token, authInfo, DefTokenDuration)
|
||||
return authInfo
|
||||
|
||||
@@ -14,9 +14,10 @@ type DefAuther struct {
|
||||
|
||||
// 此函数为空
|
||||
func (a *DefAuther) AddAuthBind(authBindEx *auth2.AuthBindEx, userName string) (err error) {
|
||||
dao.WrapAddIDCULDEntity(&authBindEx.AuthBind, userName)
|
||||
authBindEx.Status = model.AuthBindStatusNormal
|
||||
err = dao.CreateEntity(nil, &authBindEx.AuthBind)
|
||||
authBind := &authBindEx.AuthBind
|
||||
dao.WrapAddIDCULDEntity(authBind, userName)
|
||||
authBind.Status = model.AuthBindStatusNormal
|
||||
err = dao.CreateEntity(nil, authBind)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user