This commit is contained in:
laodaming 2023-11-15 17:58:14 +08:00
parent 29a45315a2
commit 607398f7ec

View File

@ -41,7 +41,7 @@ func (l *Ldap) Delete(DN string) error {
// 查询资源(分组/用户)
func (l *Ldap) Search(DN, filter string, attr []string, controls []ldap.Control) (resp *ldap.SearchResult, err error) {
if filter == "" {
filter = "(objectClass=*)"
filter = "(objectClass=*)" //查询多个 与(&(objectClass=a)(objectClass=b)) 或 (|(objectClass=a)(objectClass=b))
}
searchRequest := ldap.NewSearchRequest(
DN,