aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-31 17:25:25 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-31 17:25:25 +0000
commit444788477e7c8a71a4765f9b658cf88405d41da7 (patch)
tree22955d56c2458f1dc6a5e8c693d321f8de3a4677
parent070a15294578ad604fb105777708cddd61f89a3b (diff)
Don't send Zurich admin email to user unless email confirmed (fixes a5).
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index c7b2f534f..ec65ec8f0 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -406,6 +406,8 @@ sub admin_report_edit {
sub _admin_send_email {
my ( $c, $template, $problem ) = @_;
+ return unless $problem->extra && $problem->extra->{email_confirmed};
+
my $to = $problem->name
? [ $problem->user->email, $problem->name ]
: $problem->user->email;