mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-07 02:20:28 +08:00
Add organization.DefaultPassword
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user