Merge remote-tracking branch 'origin/mark' into yonghui

This commit is contained in:
苏尹岚
2020-01-06 17:47:03 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -285,7 +285,7 @@ func Login(ctx *Context, authType, authID, authIDType, authSecret string) (authI
if authSecret == InternalAuthSecret { if authSecret == InternalAuthSecret {
authSecret = "" authSecret = ""
} }
return LoginInternal(ctx, authIDType, authID, authIDType, authSecret) return LoginInternal(ctx, authType, authID, authIDType, authSecret)
} }
// 通过临时TOKEN绑定新创建的用户 // 通过临时TOKEN绑定新创建的用户

View File

@@ -153,11 +153,11 @@ func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVeri
createName := ctx.GetRealRemoteIP() createName := ctx.GetRealRemoteIP()
authType := auth2.AuthTypeMobile authType := auth2.AuthTypeMobile
if manTokenInfo != nil && mobileVerifyCode == "" { if manTokenInfo != nil && mobileVerifyCode == "" {
user, err2 := dao.GetUserByID(dao.GetDB(), "user_id", manTokenInfo.GetID()) manUser, err2 := dao.GetUserByID(dao.GetDB(), "user_id", manTokenInfo.GetID())
if err = err2; err != nil { if err = err2; err != nil {
return nil, err return nil, err
} }
if user.Type&(model.UserTypeOperator|model.UserTypeBoss) == 0 { if manUser.Type&(model.UserTypeOperator|model.UserTypeBoss) == 0 {
return nil, fmt.Errorf("管理员才能添加商户") return nil, fmt.Errorf("管理员才能添加商户")
} }
if utils.Pointer2String(user.Mobile) == "" { if utils.Pointer2String(user.Mobile) == "" {