Separate multiple tags with commas, spaces, or both.
<pre>
+User: <<var>username</var>>
Usertags: <<var>usertags</var>>
</pre>
-<p>Replace <<var>tags</var>> with one or more usertags. Separate
-multiple tags with commas, spaces, or both.</p>
+<p>Replace <<var>usertags</var>> with one or more usertags.
+Separate multiple tags with commas, spaces, or both. If you specify a
+username, that users tags will be set. Otherwise, the email address of
+the sender will be used as the username</p>
<h2>Not forwarding to the mailing list - minor $gBug reports</h2>
# Deal with usertags
if (exists $pheader{usertags}) {
my $user = $replyto;
+ $user = $pheader{user} if exists $pheader{user};
$user =~ s/,.*//;
$user =~ s/^.*<(.*)>.*$/$1/;
$user =~ s/[(].*[)]//;
$user =~ s/^\s*(\S+)\s+.*$/$1/;
- $user = "" unless (Debbugs::User::is_valid_user($user));
- if ($user ne '') {
+ if ($user ne '' and Debbugs::User::is_valid_user($user)) {
$pheader{usertags} =~ s/(?:^\s+|\s+$)//g;
my %user_tags;
read_usertags(\%user_tags,$user);
}
write_usertags(\%usertags,$user);
}
+ else {
+ $brokenness .=<<END;
+Your message tried to set a usertag, but didn't have a valid
+user set ('$user' isn't valid)
+END
+ }
}
&overwrite("db-h/$hash/$ref.report",
join("\n",@msg)."\n");