From 14ecc0f45f8c536184f5d2c115f1365958d4395d Mon Sep 17 00:00:00 2001 From: Wainui Witika-Park Date: Fri, 20 Jan 2023 15:43:45 +1300 Subject: [PATCH] Revert "Bug 31908: Resolve second login with another userid" This reverts commit 68cde441b325a8ceabe44355d616507e84d03783. --- C4/Auth.pm | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 1e3db9d7d5..a8ed6a7569 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -950,35 +950,6 @@ sub checkauth { if ($session) { $session->delete(); $session->flush; - $cookie = $cookie_mgr->clear_unless( $query->cookie, @$cookie ); - C4::Context::_unset_userenv($sessionID); - $sessionID = undef; - undef $userid; # IMPORTANT: this assures us a new session in code below - } elsif (!$logout) { - - $cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie( - -name => 'CGISESSID', - -value => $session->id, - -HttpOnly => 1, - -secure => ( C4::Context->https_enabled() ? 1 : 0 ), - -sameSite => 'Lax', - )); - - $flags = haspermission( $userid, $flagsrequired ); - unless ( $flags ) { - $auth_state = 'failed'; - $info{'nopermission'} = 1; - } - } - } elsif ( !$logout ) { - if ( $return eq 'expired' ) { - $info{timed_out} = 1; - } elsif ( $return eq 'restricted' ) { - $info{oldip} = $more_info->{old_ip}; - $info{newip} = $more_info->{new_ip}; - $info{different_ip} = 1; - } elsif ( $return eq 'password_expired' ) { - $info{password_has_expired} = 1; } C4::Context->_unset_userenv($sessionID); -- 2.39.5