diff options
Diffstat (limited to 'contrib/sendbugmail.pl')
-rwxr-xr-x | contrib/sendbugmail.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/sendbugmail.pl b/contrib/sendbugmail.pl index f4bebabc6..51de9407d 100755 --- a/contrib/sendbugmail.pl +++ b/contrib/sendbugmail.pl @@ -56,13 +56,14 @@ if ($changer !~ /$match/) { print STDERR "Changer \"$changer\" doesn't match email regular expression.\n"; usage(); } -if(!login_to_id($changer)) { - print STDERR "\"$changer\" is not a login ID.\n"; +my $changer_user = new Bugzilla::User({ name => $changer }); +unless ($changer_user) { + print STDERR "\"$changer\" is not a valid user.\n"; usage(); } # Send the email. -my $outputref = Bugzilla::BugMail::Send($bugnum, {'changer' => $changer }); +my $outputref = Bugzilla::BugMail::Send($bugnum, {'changer' => $changer_user }); # Report the results. my $sent = scalar(@{$outputref->{sent}}); |