Improve user error handling.

This commit is contained in:
Gucheng Wang
2021-12-12 19:59:55 +08:00
parent 96e2f286ee
commit f4265d015a
5 changed files with 16 additions and 5 deletions

View File

@ -313,6 +313,10 @@ func AddUser(user *User) bool {
user.Id = util.GenerateId()
}
if user.Owner == "" || user.Name == "" {
return false
}
organization := GetOrganizationByUser(user)
user.UpdateUserPassword(organization)