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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]

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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to