fix: fix bug in LDAP user login error count (#2636)

Fix the issue where the login error count is not reset to 0 after a successful LDAP user login.
This commit is contained in:
HGZ-20 2024-01-22 13:42:11 +08:00 committed by GitHub
parent d7c40459c0
commit 5318519bf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -314,7 +314,7 @@ func checkLdapUserPassword(user *User, password string, lang string) error {
} }
return fmt.Errorf(i18n.Translate(lang, "check:LDAP user name or password incorrect")) return fmt.Errorf(i18n.Translate(lang, "check:LDAP user name or password incorrect"))
} }
return nil return resetUserSigninErrorTimes(user)
} }
func CheckUserPassword(organization string, username string, password string, lang string, options ...bool) (*User, error) { func CheckUserPassword(organization string, username string, password string, lang string, options ...bool) (*User, error) {