diff --git a/C4/Auth.pm b/C4/Auth.pm index 7cf4c9dbc8..0e0a1a3dc4 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -824,7 +824,7 @@ sub checkauth { my $template_name = shift; $type = 'opac' unless $type; - unless ( C4::Context->preference("OpacPublic") ) { + if ( $type eq 'opac' && !C4::Context->preference("OpacPublic") ) { my @allowed_scripts_for_private_opac = qw( opac-memberentry.tt opac-registration-email-sent.tt