- RegisterUser中误设置UserTypeBoss

This commit is contained in:
gazebo
2019-08-27 14:44:10 +08:00
parent af5947288d
commit ebb8b8ed44

View File

@@ -89,9 +89,11 @@ func RegisterUser(user *model.User, mobileVerifyCode string, inAuthInfo *auth2.A
if !mobileAuth.IsUserEmpty() {
return nil, jsonerr.New(mobileAuth, model.ErrCodeJsonActSkuConflict)
}
user.Type = model.UserTypeConsumer | model.UserTypeBoss
user.Type = model.UserTypeConsumer
if inAuthInfo.AuthBindInfo.Type == dingding.AuthTypeStaff {
user.Type |= model.UserTypeOperator
} else {
user.Type |= model.UserTypeStoreBoss
}
if err = CreateUser(user, "RegisterUser"); err == nil {
if outAuthInfo, err = auth2.BindUser(mobileAuth, user); err == nil && inAuthInfo != nil {