X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-user.html;h=ec2341be68d6a91806c66c94096dfceb02ba16c7;hb=dac4bb8dc3fcdd36fdcaf445c12134103a9d599e;hp=6264398e2efa0b7950b99a629de2e12106332145;hpb=80f722b82cb92fa49ee172230be3c61f72e56f41;p=freeside.git
diff --git a/httemplate/elements/select-user.html b/httemplate/elements/select-user.html
index 6264398e2..ec2341be6 100644
--- a/httemplate/elements/select-user.html
+++ b/httemplate/elements/select-user.html
@@ -4,7 +4,10 @@
% }
-% foreach my $usernum ( keys %{ $opt{'access_user'} } ) {
+% foreach my $usernum (
+% sort { $opt{'access_user'}->{$a} cmp $opt{'access_user'}->{$b} }
+% keys %{ $opt{'access_user'} }
+% ) {
% }
@@ -16,12 +19,9 @@ my %opt = @_;
unless ( $opt{'access_user'} ) {
- tie %{ $opt{'access_user'} }, 'Tie::IxHash';
-
my $sth = dbh->prepare("
SELECT usernum, username FROM access_user
WHERE disabled = '' or disabled IS NULL
- ORDER BY username
") or die dbh->errstr;
$sth->execute or die $sth->errstr;
while ( my $row = $sth->fetchrow_arrayref ) {