return error when uuid is not enough

This commit is contained in:
MaysWind
2023-09-16 22:31:20 +08:00
parent 729904e1c3
commit 165377816c
10 changed files with 94 additions and 3 deletions
+5
View File
@@ -153,6 +153,11 @@ func (s *UserService) CreateUser(c *core.Context, user *models.User) error {
}
user.Uid = s.GenerateUuid(uuid.UUID_TYPE_USER)
if user.Uid < 1 {
return errs.ErrSystemIsBusy
}
user.Password = utils.EncodePassword(user.Password, user.Salt)
user.Deleted = false