diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-10-05 08:10:58 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-10-05 08:10:58 +0100 |
commit | bb24ffc0e9e3eaf2b9cfb7e88020a9b5b0328a3e (patch) | |
tree | dd3ba6c0cf86ecc4c1fb6ab5b3f377b52c81cd06 /perllib/FixMyStreet/App/Controller/Auth/Profile.pm | |
parent | 70ddda2c5e851c012b2bb98ec74c87490be6dad0 (diff) |
Accept +1 geographic numbers as possibly mobile.
We have no way of knowing whether a +1 geographic number is fixed
line or mobile, so accept them all as potentially mobile.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth/Profile.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Auth/Profile.pm | 4 |
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) { |