- StoreBoss
This commit is contained in:
@@ -82,6 +82,10 @@ func RegisterUser(user *model.User, mobileVerifyCode string, inAuthInfo *auth2.A
|
||||
if !mobileAuth.IsUserEmpty() {
|
||||
return nil, model.ErrCodeUserAlreadyExist, auth2.ErrUserMobileAlreadyExist
|
||||
}
|
||||
user.Type = model.UserTypeConsumer
|
||||
if inAuthInfo.AuthBindInfo.Type == dingding.AuthTypeStaff {
|
||||
user.Type |= model.UserTypeOperator
|
||||
}
|
||||
if err = CreateUser(user); err == nil {
|
||||
if outAuthInfo, err = auth2.BindUser(mobileAuth, user); err == nil && inAuthInfo != nil {
|
||||
err = auth2.AddAuthBind(outAuthInfo, inAuthInfo)
|
||||
|
||||
Reference in New Issue
Block a user