mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 00:34:28 +08:00
return error when uuid is not enough
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user