<%args> $Format => undef <%init> my @results; my $title = loc('Manage auto-created users'); unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) { Abort(loc('This feature is only available to system administrators.')); } my $format_config = RT->Config->Get('AdminSearchResultFormat')->{'Users'}; $format_config =~ s/__Name__/__EmailAddress__/; $format_config =~ s/TITLE\:Name/TITLE\:EmailAddress/; $format_config =~ s/__RealName__\,\s+__EmailAddress__//; $format_config .= q{,__WatchingTickets__,__Action__,__MergeUser__}; $Format ||= $format_config; my $manager = 'RT::Extension::ManageAutoCreatedUsers'; if ($ARGS{'update-autocreated-users'}) { @results = $manager->process_form(\%ARGS); } my $users = $manager->get_autocreated_users; <& /Admin/Elements/Header, Title => $title &> <& /Elements/Tabs &> <& /Elements/ListActions, actions => \@results &> <&|/Widgets/TitleBox, title => loc('Auto-created Users') &> % if ( $users->Count ) { <& /Elements/CollectionList, OrderBy => 'Name', Order => 'ASC', Rows => 25, %ARGS, Format => $Format, Collection => $users, AllowSorting => 1, PassArguments => [qw(Format Rows Page Order OrderBy)], &> % } else {

<&|/l&>(No users)

% }