https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30348 Bug ID: 30348 Summary: Create sub clear_session_and_cookies Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Authentication Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org Possible follow-up of 29957 Something like: =head2 clear_session_and_cookies ( $session, $sessionID, $cookie ) = clear_session_and_cookies( $session, $sessionID, $cookie, $mgr, $cgi ); =cut sub clear_session_and_cookies { my ( $session, $sessionID, $cookie, $mgr, $cgi ) = @_; $mgr //= Koha::CookieManager->new; $session->delete; $session->flush; my @list = ref($cgi) eq 'CGI' ? $cgi->cookie : (); push @list, @$cookie if ref($cookie) eq 'ARRAY'; $cookie = $cookie_mgr->clear_unless( @list ); C4::Context::_unset_userenv($sessionID); return ( undef, undef, $cookie ); } -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.