Skip to content

Commit

Permalink
Support pagination in two-level LDAP searches
Browse files Browse the repository at this point in the history
  • Loading branch information
farialima committed Nov 18, 2023
1 parent 76e574a commit 993d819
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/lib/Sympa/DataSource/LDAP2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,23 @@ sub _open {
my @values;
while (
my $entry = $self->SUPER::_next(
attrs => $self->{attrs1},
select => $self->{select1},
regex => $self->{regex1},
turn => 'first'
filter => $self->{filter1},
attrs => $self->{attrs1},
select => $self->{select1},
regex => $self->{regex1},
timeout => $self->{timeout1},
suffix => $self->{suffix1},
scope => $self->{scope1},
turn => 'first'
)
) {
push @values, $entry->[0] if defined $entry->[0];
}
$self->{_attr1values} = [@values];

# Don't paginate subsequent children searches, they return only one record
$self->{_page} = undef;

return 1;
}

Expand Down

0 comments on commit 993d819

Please sign in to comment.