This commit is contained in:
eson
2023-08-30 14:21:09 +08:00
parent fe6baf6e41
commit 09fb6c3a36
3 changed files with 11 additions and 5 deletions

View File

@@ -41,6 +41,11 @@ func (l *UserRegisterLogic) UserRegister(req *types.RequestUserRegister, userinf
return resp.SetStatus(basic.CodeOAuthEmailErr)
}
_, err := l.svcCtx.AllModels.FsUser.FindUserByEmail(l.ctx, req.Email)
if err == nil {
return resp.SetStatus(basic.CodeEmailExistsErr)
}
token := &auth.RegisterToken{
OperateType: auth.OpTypeRegister,
GuestId: userinfo.GuestId,