diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-02-05 09:11:57 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-02-05 09:25:46 +0000 |
commit | 6edf79cb0ecd150ea0f054c8faa7be0b055fc2d0 (patch) | |
tree | edca9b26dde0dcec565a8677282e67122471bcde /perllib/FixMyStreet/DB/Result/User.pm | |
parent | 7c7e9ba678a1785b34593e0295b124f2da89c101 (diff) |
Upgrade Number::Phone.
This brings in my new format_for_country function which allows
for nicer display of phone numbers to people.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/User.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/User.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm index 27ba9f0e3..97f2132b1 100644 --- a/perllib/FixMyStreet/DB/Result/User.pm +++ b/perllib/FixMyStreet/DB/Result/User.pm @@ -154,8 +154,9 @@ sub username { sub phone_display { my $self = shift; return $self->phone unless $self->phone; + my $country = FixMyStreet->config('PHONE_COUNTRY'); my $parsed = FixMyStreet::SMS->parse_username($self->phone); - return $parsed->{phone} ? $parsed->{phone}->format : $self->phone; + return $parsed->{phone} ? $parsed->{phone}->format_for_country($country) : $self->phone; } sub latest_anonymity { |