- RegisterUser中误设置UserTypeBoss
This commit is contained in:
@@ -89,9 +89,11 @@ func RegisterUser(user *model.User, mobileVerifyCode string, inAuthInfo *auth2.A
|
|||||||
if !mobileAuth.IsUserEmpty() {
|
if !mobileAuth.IsUserEmpty() {
|
||||||
return nil, jsonerr.New(mobileAuth, model.ErrCodeJsonActSkuConflict)
|
return nil, jsonerr.New(mobileAuth, model.ErrCodeJsonActSkuConflict)
|
||||||
}
|
}
|
||||||
user.Type = model.UserTypeConsumer | model.UserTypeBoss
|
user.Type = model.UserTypeConsumer
|
||||||
if inAuthInfo.AuthBindInfo.Type == dingding.AuthTypeStaff {
|
if inAuthInfo.AuthBindInfo.Type == dingding.AuthTypeStaff {
|
||||||
user.Type |= model.UserTypeOperator
|
user.Type |= model.UserTypeOperator
|
||||||
|
} else {
|
||||||
|
user.Type |= model.UserTypeStoreBoss
|
||||||
}
|
}
|
||||||
if err = CreateUser(user, "RegisterUser"); err == nil {
|
if err = CreateUser(user, "RegisterUser"); err == nil {
|
||||||
if outAuthInfo, err = auth2.BindUser(mobileAuth, user); err == nil && inAuthInfo != nil {
|
if outAuthInfo, err = auth2.BindUser(mobileAuth, user); err == nil && inAuthInfo != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user