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'};