[Koha-bugs] [Bug 28417] Authen::CAS::Client always loaded even if CAS is not used

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 3 13:43:08 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28417

--- Comment #15 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Tomas, I think your patch is adding back the problem in opac-user.pl.

What about the following change?

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(
     {

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list