aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Tokens.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Tokens.pm11
1 files changed, 2 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm
index 792c875fd..958188ca0 100644
--- a/perllib/FixMyStreet/App/Controller/Tokens.pm
+++ b/perllib/FixMyStreet/App/Controller/Tokens.pm
@@ -57,15 +57,8 @@ sub confirm_problem : Path('/P') {
) if $problem->state eq 'unconfirmed';
# Subscribe problem reporter to email updates
- my $alert = $c->model('DB::Alert')->find_or_create(
- {
- user => $problem->user,
- alert_type => 'new_updates',
- cobrand => $problem->cobrand,
- cobrand_data => $problem->cobrand_data,
- parameter => $problem->id
- }
- )->confirm;
+ $c->stash->{report} = $c->stash->{problem};
+ $c->forward( '/report/new/create_reporter_alert' );
# log the problem creation user in to the site
$c->authenticate( { email => $problem->user->email }, 'no_password' );