fix: panic when creating a user in a non-existent org (#969)

This commit is contained in:
Artem 2022-08-06 17:30:56 +03:00 committed by GitHub
parent 539ca2d731
commit aafdc546fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,6 +417,10 @@ func AddUser(user *User) bool {
}
organization := GetOrganizationByUser(user)
if organization == nil {
return false
}
user.UpdateUserPassword(organization)
user.UpdateUserHash()