From 7c7d54475dcdb041af4b42b13d3d4084627a8e9f Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Wed, 4 Mar 2015 18:33:52 -0600 Subject: RT#22952: Employee drop down list in reports shows employee users for all agents --- httemplate/elements/select-user.html | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/select-user.html b/httemplate/elements/select-user.html index ec2341be6..e77788f61 100644 --- a/httemplate/elements/select-user.html +++ b/httemplate/elements/select-user.html @@ -17,17 +17,6 @@ my %opt = @_; -unless ( $opt{'access_user'} ) { - - my $sth = dbh->prepare(" - SELECT usernum, username FROM access_user - WHERE disabled = '' or disabled IS NULL - ") or die dbh->errstr; - $sth->execute or die $sth->errstr; - while ( my $row = $sth->fetchrow_arrayref ) { - $opt{'access_user'}->{$row->[0]} = $row->[1]; - } - -} +$opt{'access_user'} ||= $FS::CurrentUser::CurrentUser->access_users_hashref(); -- cgit v1.2.1