aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-09-15 17:51:30 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-09-30 13:02:51 +0100
commitbfdae700a840b74595bb4798ae6d50bb9172fa72 (patch)
treed2ff6bd923eaa154cb8a42db33d33c6d6b74e083 /perllib/FixMyStreet/App/Controller/Auth.pm
parentf97088d63bea6547daaf0120aba2c503a4bf7d9a (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/Auth.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index 3e90fb7ca..3eb724ddd 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -76,7 +76,7 @@ sub sign_in : Private {
if ( $email
&& $password
- && $c->authenticate( { email => $email, password => $password } ) )
+ && $c->authenticate( { email => $email, email_verified => 1, password => $password } ) )
{
# unless user asked to be remembered limit the session to browser
@@ -233,7 +233,7 @@ sub token : Path('/M') : Args(1) {
$user->facebook_id( $data->{facebook_id} ) if $data->{facebook_id};
$user->twitter_id( $data->{twitter_id} ) if $data->{twitter_id};
$user->update_or_insert;
- $c->authenticate( { email => $user->email }, 'no_password' );
+ $c->authenticate( { email => $user->email, email_verified => 1 }, 'no_password' );
# send the user to their page
$c->detach( 'redirect_on_signin', [ $data->{r}, $data->{p} ] );