feat:完善入驻信息管理
This commit is contained in:
@ -31,8 +31,8 @@ func (c *RegisterParams) checkCaptcha() (bool, error) {
|
||||
func (c *RegisterParams) checkUserExist(mUserInstance *model2.UserInstance, local string) (bool, error) {
|
||||
var count int64
|
||||
|
||||
if err := model2.Count(mUserInstance, &count, model2.NewWhere("mobile", c.Mobile),
|
||||
model2.NewWhere("local", local)); err != nil {
|
||||
if err := model2.Count(mUserInstance, &count, model2.NewWhere("mobile", c.Mobile)); //model2.NewWhere("local", local)
|
||||
err != nil {
|
||||
return false, err
|
||||
}
|
||||
return count <= 0, nil
|
||||
@ -60,7 +60,6 @@ func (c *Register) Launch(params *RegisterParams) (*InstanceLoginReturn, error)
|
||||
} else if !pass {
|
||||
return nil, errors.New("当前手机号码已注册")
|
||||
}
|
||||
mUserInstance.Local.Local = c.local
|
||||
mUserInstance.Source = model2.UserInstanceSourceForLocal
|
||||
mUserInstance.Password = utils.GetRandomString(12)
|
||||
mUserInstance.Mobile = params.Mobile
|
||||
|
||||
Reference in New Issue
Block a user