aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth/Phone.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/Phone.pm
parent861b3ace16097b5558d749210509afe4f0bdf70f (diff)
parentbb24ffc0e9e3eaf2b9cfb7e88020a9b5b0328a3e (diff)
Merge remote-tracking branch 'origin/fix-geographic-mobile-numbers'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth/Phone.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth/Phone.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth/Phone.pm b/perllib/FixMyStreet/App/Controller/Auth/Phone.pm
index 4e9f92596..e4ffc2205 100644
--- a/perllib/FixMyStreet/App/Controller/Auth/Phone.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth/Phone.pm
@@ -45,19 +45,19 @@ and sets up the token/etc to deal with the response.
=cut
sub sign_in : Private {
- my ( $self, $c, $phone ) = @_;
+ my ( $self, $c, $parsed ) = @_;
- unless ($phone) {
+ unless ($parsed->{phone}) {
$c->stash->{username_error} = 'other_phone';
return;
}
- unless ($phone->is_mobile) {
+ unless ($parsed->{may_be_mobile}) {
$c->stash->{username_error} = 'nonmobile';
return;
}
- (my $number = $phone->format) =~ s/\s+//g;
+ (my $number = $parsed->{phone}->format) =~ s/\s+//g;
if ( FixMyStreet->config('SIGNUPS_DISABLED')
&& !$c->model('DB::User')->find({ phone => $number })