]> git.proxmox.com Git - pve-access-control.git/commitdiff
pveum: list tfa: sort by user ID
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 21 Jun 2023 17:41:31 +0000 (19:41 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 21 Jun 2023 17:43:49 +0000 (19:43 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/CLI/pveum.pm

index 098b041fcac543f0b34590919facd2f30c543fe1..9e64709776836d105b31d36d0af4c7c509ad39f9 100755 (executable)
@@ -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";