Sort users page by date joined
This commit is contained in:
parent
48e2c4da8c
commit
e475479e50
1 changed files with 4 additions and 2 deletions
|
@ -52,11 +52,13 @@ sub user_pages ($self) {
|
|||
$mesg = $ldap->search(
|
||||
base => 'OU=Dogs,DC=unix,DC=dog',
|
||||
filter => '(objectClass=posixAccount)',
|
||||
attrs => ['uid'],
|
||||
attrs => ['uid', 'createTimestamp'],
|
||||
);
|
||||
$mesg->code and die $mesg->error;
|
||||
|
||||
for ($mesg->entries) {
|
||||
my @sorted = sort {$a->get_value('createTimestamp') cmp $b->get_value('createTimestamp')} $mesg->entries;
|
||||
|
||||
for (@sorted) {
|
||||
push @{$users}, $_->get_value('uid');
|
||||
}
|
||||
return $users;
|
||||
|
|
Loading…
Reference in a new issue