my %search_hash = ();
my @extra_sql = ();
-my @header = ( '#', 'Service', 'Account' );
-my @fields = ( 'svcnum', 'svc', 'email' );
-my @links = ( $link, $link, $link );
-my $align = 'rll';
-my @color = ( '', '', '' );
-my @style = ( '', '', '' );
+my @header = ( 'Service', 'Account' );
+my @fields = ( 'svc', 'email' );
+my @links = ( $link, $link );
+my $align = 'll';
+my @color = ( '', '' );
+my @style = ( '', '' );
my @footer = ();
my $conf = new FS::Conf;
push @style, '';
}
-#maybe hide the UID if a flag isn't passed... its much less useful these days
-push @header, 'Real Name', 'UID', 'Last Login';
-push @fields, 'finger', 'uid', 'last_login_text';
-push @links, $link, $link, $link;
-$align .= 'llr';
-push @color, '', '', '';
-push @style, '', '', '';
+push @header, 'Real Name';
+push @fields, 'finger';
+push @links, $link;
+$align .= 'l';
+push @color, '';
+push @style, '';
+
+#hide the UID, its much less useful these days
+if ( $cgi->param('show_uid') ) { #XXX add a checkbox
+ push @header, 'UID';
+ push @fields, 'uid';
+ push @links, $link;
+ $align .= 'l';
+ push @color, '';
+ push @style, '';
+}
+
+push @header, 'Last Login';
+push @fields, 'last_login_text';
+push @links, $link;
+$align .= 'r';
+push @color, '';
+push @style, '';
+
for (qw( domain domsvc agentnum custnum popnum svcpart cust_fields )) {
$search_hash{$_} = $cgi->param($_) if length($cgi->param($_));
push @color, '';
push @style, '';
- @footer = ( '', 'Total', '', '', '',
+ @footer = ( 'Total', '', '', '',
sub { format_time($tot_time) }, #time
);
;
}
+ push @footer, '', '';
+
}
} elsif ( $cgi->param('magic') =~ /^nologin$/ ) {
}
$cgi->param('username') =~ /^([\w\-\.\&]+)$/; #untaint username_text
- my $username = $1;
+ my $username = lc($1);
- push @username_sql, "username ILIKE '$username'"
+ push @username_sql, "LOWER(username) LIKE '$username'"
if $username_type{'Exact'}
|| $username_type{'Fuzzy'};
- push @username_sql, "username ILIKE '\%$username\%'"
+ push @username_sql, "LOWER(username) LIKE '\%$username\%'"
if $username_type{'Substring'}
|| $username_type{'All'};