--- Begin Message ---
Hello,
I don't know if this what you are looking for but here is a sub I wrote
to get the high id.
sub next_id {
my $self = shift;
my $ldap = $self->{CONN};
my $uids = $ldap->search(
base => "ou=People,dc=wtamu,dc=edu",
scope => "sub",
filter => "uidNumber=*",
attrs => [qw/ uidNumber /],
);
my @uids;
if ($uids->count > 0) {
foreach my $uid ($uids->all_entries) {
push @uids, $uid->get_value("uidNumber");
}
}
@uids = sort { $b <=> $a } @uids;
my $high = shift @uids;
$self->{NEXT_ID} = ++$high;
return $self->{NEXT_ID};
}
I hope it helps.
Robert Boone
On Wed, 2004-08-18 at 12:10, news.hinet.net wrote:
> Openldap V2.2 support Modify/Increment extension but have no any document
> teach us
> how to setup or to got the last uidnumber.
> Have any method to find max uidnumber??
>
>
--- End Message ---