aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-06-01 10:08:55 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-06-03 16:58:25 +0100
commita7541a181013378da0090da53847c882881825d0 (patch)
tree9558f83fbac4712c4ca2711daff0ef9ea769dc10 /perllib/FixMyStreet/App.pm
parentf8859e29f5bcf75c1b2acb934bd4353f83c5a2c1 (diff)
Add user_country call that uses Gaze.
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 6a41d93a9..4ca6f23cb 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -536,6 +536,11 @@ sub check_2fa {
return 0;
}
+sub user_country {
+ my $c = shift;
+ return FixMyStreet::Gaze::get_country_from_ip($c->req->address);
+}
+
=head1 SEE ALSO
L<FixMyStreet::App::Controller::Root>, L<Catalyst>