diff --git a/object/check.go b/object/check.go index 36defa0d..5200cf1f 100644 --- a/object/check.go +++ b/object/check.go @@ -354,8 +354,8 @@ func CheckUserPassword(organization string, username string, password string, la } } - if user.Ldap != "" && (isSigninViaLdap || user.Password == "") { - if !isPasswordWithLdapEnabled { + if user.Ldap != "" { + if !isSigninViaLdap && !isPasswordWithLdapEnabled { return nil, fmt.Errorf(i18n.Translate(lang, "check:password or code is incorrect")) }