pveum: list tfa: sort by user ID

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-06-21 19:41:31 +02:00
parent c200d9fd70
commit aba03c966e

View File

@ -187,7 +187,7 @@ __PACKAGE__->register_method({
} else {
my $result = $tfa_cfg->api_list_tfa('', 1);
my $nl = '';
for my $entry (@$result) {
for my $entry (sort { $a->{userid} cmp $b->{userid} } @$result) {
print "${nl}$entry->{userid}:\n";
format_tfa_entries($entry->{entries}, ' ');
$nl = "\n";