diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-09-15 17:51:30 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-09-30 13:02:51 +0100 |
commit | bfdae700a840b74595bb4798ae6d50bb9172fa72 (patch) | |
tree | d2ff6bd923eaa154cb8a42db33d33c6d6b74e083 /perllib/FixMyStreet/App/Controller/Tokens.pm | |
parent | f97088d63bea6547daaf0120aba2c503a4bf7d9a (diff) |
Add 'verified' database columns for email/phone.
These are so we can state whether a user's email address or phone number
have been verified by confirmation email/text.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Tokens.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm index a1b0c57ba..1d4438828 100644 --- a/perllib/FixMyStreet/App/Controller/Tokens.pm +++ b/perllib/FixMyStreet/App/Controller/Tokens.pm @@ -109,7 +109,7 @@ sub confirm_problem : Path('/P') { $problem->user->twitter_id( $data->{twitter_id} ) if $data->{twitter_id}; $problem->user->update; } - $c->authenticate( { email => $problem->user->email }, 'no_password' ); + $c->authenticate( { email => $problem->user->email, email_verified => 1 }, 'no_password' ); $c->set_session_cookie_expire(0); $c->stash->{created_report} = 'fromemail'; @@ -170,7 +170,7 @@ sub confirm_alert : Path('/A') { } if (!$alert->confirmed && $c->stash->{confirm_type} ne 'unsubscribe') { - $c->authenticate( { email => $alert->user->email }, 'no_password' ); + $c->authenticate( { email => $alert->user->email, email_verified => 1 }, 'no_password' ); $c->set_session_cookie_expire(0); } @@ -237,7 +237,7 @@ sub confirm_update : Path('/C') { $comment->user->update; } - $c->authenticate( { email => $comment->user->email }, 'no_password' ); + $c->authenticate( { email => $comment->user->email, email_verified => 1 }, 'no_password' ); $c->set_session_cookie_expire(0); $c->forward('/report/update/confirm'); @@ -269,7 +269,7 @@ sub questionnaire : Path('/Q') : Args(1) { my $questionnaire = $c->stash->{questionnaire}; if (!$questionnaire->whenanswered) { - $c->authenticate( { email => $questionnaire->problem->user->email }, 'no_password' ); + $c->authenticate( { email => $questionnaire->problem->user->email, email_verified => 1 }, 'no_password' ); $c->set_session_cookie_expire(0); } $c->forward( '/questionnaire/show' ); |