Revision 8354
Added by ben leinfelder about 11 years ago
ldapweb.cgi | ||
---|---|---|
334 | 334 |
|
335 | 335 |
my $dt = DateTime->now; |
336 | 336 |
$dt->subtract( hours => $orgExpiration ); |
337 |
my $expirationDate = $dt->ymd() . $dt->hms() . "Z";
|
|
337 |
my $expirationDate = $dt->ymd("") . $dt->hms("") . "Z";
|
|
338 | 338 |
my $filter = "(createTimestamp <= " . $expirationDate . ")"; |
339 | 339 |
debug("Clearing expired accounts with filter: " . $filter); |
340 | 340 |
my @attrs = [ 'uid', 'o', 'ou', 'cn', 'mail', 'telephoneNumber', 'title' ]; |
... | ... | |
351 | 351 |
$ldap->start_tls( verify => 'none'); |
352 | 352 |
$ldap->bind( version => 3, dn => $ldapUsername, password => $ldapPassword ); |
353 | 353 |
$mesg = $ldap->search ( |
354 |
base => $base,
|
|
354 |
base => $orgAuthBase,
|
|
355 | 355 |
filter => $filter, |
356 | 356 |
attrs => \@attrs, |
357 | 357 |
); |
... | ... | |
368 | 368 |
$ldap->unbind; # take down session |
369 | 369 |
} |
370 | 370 |
|
371 |
return $foundAccounts;
|
|
371 |
return 0;
|
|
372 | 372 |
} |
373 | 373 |
|
374 | 374 |
sub fullTemplate { |
Also available in: Unified diff
correct some syntax errors, date filter formatting. https://projects.ecoinformatics.org/ecoinfo/issues/6099