- up
This commit is contained in:
@@ -123,9 +123,9 @@ func createAuthInfo(user IUser, authBindInfo *AuthBindEx) (authInfo *AuthInfo) {
|
|||||||
}
|
}
|
||||||
if user != nil {
|
if user != nil {
|
||||||
authInfo.UpdateByIUser(user)
|
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 {
|
} 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)
|
SetUserInfo(token, authInfo, DefTokenDuration)
|
||||||
return authInfo
|
return authInfo
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ type DefAuther struct {
|
|||||||
|
|
||||||
// 此函数为空
|
// 此函数为空
|
||||||
func (a *DefAuther) AddAuthBind(authBindEx *auth2.AuthBindEx, userName string) (err error) {
|
func (a *DefAuther) AddAuthBind(authBindEx *auth2.AuthBindEx, userName string) (err error) {
|
||||||
dao.WrapAddIDCULDEntity(&authBindEx.AuthBind, userName)
|
authBind := &authBindEx.AuthBind
|
||||||
authBindEx.Status = model.AuthBindStatusNormal
|
dao.WrapAddIDCULDEntity(authBind, userName)
|
||||||
err = dao.CreateEntity(nil, &authBindEx.AuthBind)
|
authBind.Status = model.AuthBindStatusNormal
|
||||||
|
err = dao.CreateEntity(nil, authBind)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user