feat: support LDAP's SetPassword (#3395)

* fix: Resolve the issue mentioned in #3392

* fix: Change checkLdapUserPassword to CheckLdapUserPassword.

* fix: the issue mentioned by hsluoyz.

* fix: Check if the user parameter is nil

* fix: use existing i18n message
This commit is contained in:
Xin-Fax
2024-12-09 17:06:24 +09:00
committed by GitHub
parent 01212cd1f3
commit b927c6d7b4
5 changed files with 85 additions and 5 deletions

View File

@ -504,7 +504,7 @@ func GetPasswordToken(application *Application, username string, password string
}
if user.Ldap != "" {
err = checkLdapUserPassword(user, password, "en")
err = CheckLdapUserPassword(user, password, "en")
} else {
err = CheckPassword(user, password, "en")
}