aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/Problem.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-12-18 18:09:05 +0000
committerStruan Donald <struan@exo.org.uk>2012-12-18 18:09:05 +0000
commit2d7be5e0b8d14790d7500a108be1fc28c20b1d0c (patch)
treeaf68c3ccc38ea2290d40485032ddd291d628fd24 /perllib/FixMyStreet/DB/ResultSet/Problem.pm
parent6b18cf3210dad5777b11b00e6e1ff74df392bc33 (diff)
add in user details field to %h so we can put sensible user details in anonymous reports
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Problem.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
index 379dc2935..0d40220b2 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
@@ -292,6 +292,10 @@ sub send_reports {
$row->user->email eq $cobrand->anonymous_account->{'email'}
) {
$h{anonymous_report} = 1;
+ $h{user_details} = _('This report was submitted anonymously');
+ } else {
+ $h{user_details} = sprintf(_('Name: %s'), $row->name) . "\n\n";
+ $h{user_details} .= sprintf(_('Email: %s'), $row->user->email) . "\n\n";
}
my %reporters = ();