From 77ab8970f10cf3d8f2d8126a4a1f4c1d64110748 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Tue, 5 May 2009 17:23:05 +0200 Subject: [PATCH] Add a syspref for CAS logout --- C4/Auth.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index b84e40d1a6..93acc83927 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -33,7 +33,7 @@ use C4::VirtualShelves; use POSIX qw/strftime/; # use utf8; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas); +use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout); BEGIN { $VERSION = 3.02; # set version for version checking @@ -44,6 +44,7 @@ BEGIN { %EXPORT_TAGS = (EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)]); $ldap = C4::Context->config('useldapserver') || 0; $cas = C4::Context->preference('casAuthentication'); + $caslogout = C4::Context->preference('casLogout'); if ($ldap) { require C4::Auth_with_ldap; # no import import C4::Auth_with_ldap qw(checkpw_ldap); @@ -640,9 +641,7 @@ sub checkauth { $sessionID = undef; $userid = undef; - if ($cas) { - warn "Here we cas logout the user"; - # Add a syspref here + if ($cas and $caslogout) { logout_cas($query); } } -- 2.39.5