From 617dfc685e13fb59b48e1e11d795318c1c8a19b7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Aug 2016 14:01:40 +0100 Subject: [PATCH] Bug 9569: Do not check the IP for login at the OPAC At the OPAC, the AutoLocation feature should not be taken into account: login to the OPAC from outside the IP range should work Signed-off-by: Chris Cormack Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall (cherry picked from commit af0af36bb9a520c31c31067b9b68fd565eef0e63) Signed-off-by: Katrin Fischer --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 52c459dd38..b532c8a5fd 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1080,7 +1080,7 @@ sub checkauth { $branchname = $library? $library->branchname: ''; } my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search }; - if ( C4::Context->boolean_preference('AutoLocation') ) { + if ( $type ne 'opac' and C4::Context->boolean_preference('AutoLocation') ) { # we have to check they are coming from the right ip range my $domain = $branches->{$branchcode}->{'branchip'}; -- 2.39.5