From 4017bb81bd5cd6766d2fe204830acd6aa2465e96 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 3 Nov 2021 13:43:11 +0100 Subject: [PATCH] Bug 28417: Don't require C4::Auth_with_cas from opac-user if not needed --- opac/opac-user.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 6feb144e508..e610cabc2ab 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -57,8 +57,10 @@ my $query = CGI->new; # CAS single logout handling # Will print header and exit -require C4::Auth_with_cas; -C4::Context->preference('casAuthentication') and C4::Auth_with_cas::logout_if_required($query); +if ( C4::Context->preference('casAuthentication') ) { + require C4::Auth_with_cas; + C4::Auth_with_cas::logout_if_required($query); +} my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { -- 2.25.1