aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/New.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/Report/New.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/Report/New.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 562f9445a..3f940d838 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -354,8 +354,12 @@ sub report_import : Path('/import') {
my $report_user = $c->model('DB::User')->find_or_create(
{
email => lc $input{email},
+ email_verified => 1,
name => $input{name},
phone => $input{phone}
+ },
+ {
+ key => 'users_email_verified_key'
}
);
@@ -447,7 +451,7 @@ sub initialize_report : Private {
if ($report) {
# log the problem creation user in to the site
- $c->authenticate( { email => $report->user->email },
+ $c->authenticate( { email => $report->user->email, email_verified => 1 },
'no_password' );
# save the token to delete at the end