aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2017-10-05 14:14:06 +0100
committerMatthew Somerville <matthew@mysociety.org>2017-10-05 14:14:06 +0100
commit4d5828bdc5076dcc08d73a0760c25fd434ce3dff (patch)
treee43540168e15ac0ec490da234f3ce1118db971cb /perllib/FixMyStreet/App/Controller/Auth/Profile.pm
parent861b3ace16097b5558d749210509afe4f0bdf70f (diff)
parentbb24ffc0e9e3eaf2b9cfb7e88020a9b5b0328a3e (diff)
Merge remote-tracking branch 'origin/fix-geographic-mobile-numbers'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth/Profile.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth/Profile.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth/Profile.pm b/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
index ecf009150..acffd3019 100644
--- a/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
@@ -118,14 +118,14 @@ sub change_phone : Path('/auth/change_phone') {
# If we've not used a mobile and we're not specifically verifying,
# and phone isn't our only verified way of logging in,
# then allow change of number (for e.g. landline).
- if (!FixMyStreet->config('SMS_AUTHENTICATION') || (!$parsed->{phone}->is_mobile && !$c->stash->{verifying} && $c->user->email_verified)) {
+ if (!FixMyStreet->config('SMS_AUTHENTICATION') || (!$parsed->{may_be_mobile} && !$c->stash->{verifying} && $c->user->email_verified)) {
$c->user->update({ phone => $phone, phone_verified => 0 });
$c->flash->{flash_message} = _('You have successfully added your phone number.');
$c->res->redirect('/my');
$c->detach;
}
- $c->forward('/auth/phone/sign_in', [ $parsed->{phone} ]);
+ $c->forward('/auth/phone/sign_in', [ $parsed ]);
}
sub verify_item : Path('/auth/verify') : Args(1) {