This commit is contained in:
Chris Mann 2023-07-23 10:35:47 +02:00
parent 9987129f3f
commit b6bcb80f0c

View file

@ -34,7 +34,7 @@ func passwordLost(user User, config *ConfigFile, ldapConn *ldap.Conn) error {
searchFilter += "(carLicense=" + user.OtherMailbox + ")"
}
searchFilter += ")"
searchReq := ldap.NewSearchRequest(config.UserBaseDN, ldap.ScopeBaseObject, ldap.NeverDerefAliases, 0, 0, false, searchFilter, []string{"cn", "uid", "mail", "carLicense"}, nil)
searchReq := ldap.NewSearchRequest(config.UserBaseDN, ldap.ScopeSingleLevel, ldap.NeverDerefAliases, 0, 0, false, searchFilter, []string{"cn", "uid", "mail", "carLicense"}, nil)
searchRes, err := ldapConn.Search(searchReq)
if err != nil {
log.Printf(fmt.Sprintf("passwordLost : %v %v", err, ldapConn))