%# If life is a stage, I want some better lighting. % if ($OK) { <&|/l&>You are now being sent a confirmation email to reset your password. % return; % } % $m->print($out); <%INIT> my $Name = $ARGS{'CustomField-24-Values'}; my $Email = $ARGS{'CustomField-25-Values'}; my $OK; if ( exists $ARGS{'Subject'} ) { if (!length($Name) or !length($Email)) { $Error = loc( "No user or email address specified" ); } else { my $Users = RT::Users->new($RT::SystemUser); $Users->Limit( FIELD => 'Name', VALUE => $Name ); $Users->LimitToEmail( $Email ); $Error = loc( "No users matching search criteria found." ) unless $Users->Count; } $OK = !$Error; } my $out = $m->scomp( '/Work/Tickets/Create.html', Queue => 'LostPassword', NoUI => 1, Loc => 1, Subject => 'Password Reminder', NoCF => { Notes => 1 }, ($Error ? () : %ARGS, Requestors => $Email), ); $m->notes( error => $Error ); <%ATTR> Tab2 => 'Password Reminder' <%ARGS> $Error => undef