diff --git a/C4/Auth.pm b/C4/Auth.pm index 9b3e89390f..c4be149dde 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1051,7 +1051,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'};