diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-03 20:21:13 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-03 20:21:13 +0100 |
commit | 5d2261eb81e9e28bbaa1f52c668be164bb7a597d (patch) | |
tree | 8144a0b47cff3fa3bc4a7dfd090d55162191174d /perllib/FixMyStreet/App/Controller/Tokens.pm | |
parent | 5e3cc91d5c7cb3c48418cf26064de2ba214e6567 (diff) |
Sign up new report to email alert if logged in as well as when confirmed by email. Allow disabling rather than deleting of alerts. Revert quoting as it breaks timestamps and literal SQL.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Tokens.pm | 11 |
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' ); |