aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm9
2 files changed, 12 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index d5b84815b..b55152693 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1162,6 +1162,9 @@ sub redirect_or_confirm_creation : Private {
}
} );
$c->stash->{token_url} = $c->uri_for_email( '/P', $token->token );
+ if ($c->cobrand->can('problem_confirm_email_extras')) {
+ $c->cobrand->problem_confirm_email_extras($report);
+ }
$c->send_email( $template, {
to => [ $report->name ? [ $report->user->email, $report->name ] : $report->user->email ],
} );
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index cded2c62d..5c6566b62 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -851,4 +851,13 @@ sub admin_stats {
return 1;
}
+sub problem_confirm_email_extras {
+ my ($self, $report) = @_;
+ my $confirmed_reports = $report->user->problems->search({
+ extra => { like => '%email_confirmed%' },
+ })->count;
+
+ $self->{c}->stash->{email_confirmed} = $confirmed_reports;
+}
+
1;