Add organization.DefaultPassword

This commit is contained in:
Yang Luo
2023-10-18 11:58:25 +08:00
parent f2e2b960ff
commit a616127909
6 changed files with 28 additions and 0 deletions

View File

@ -696,6 +696,10 @@ func AddUser(user *User) (bool, error) {
return false, nil
}
if organization.DefaultPassword != "" && user.Password == "123" {
user.Password = organization.DefaultPassword
}
if user.PasswordType == "" || user.PasswordType == "plain" {
user.UpdateUserPassword(organization)
}