mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
Improve user error handling.
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user