View | Details | Raw Unified | Return to bug 29954
Collapse All | Expand All

(-)a/C4/Auth.pm (-5 / +5 lines)
Lines 888-894 sub checkauth { Link Here
888
                $anon_search_history = $session->param('search_history');
888
                $anon_search_history = $session->param('search_history');
889
                $session->delete();
889
                $session->delete();
890
                $session->flush;
890
                $session->flush;
891
                C4::Context::_unset_userenv($sessionID);
891
                C4::Context::unset_userenv($sessionID);
892
                $sessionID = undef;
892
                $sessionID = undef;
893
            }
893
            }
894
            elsif ($logout) {
894
            elsif ($logout) {
Lines 898-904 sub checkauth { Link Here
898
                my $shibSuccess = C4::Context->userenv->{'shibboleth'};
898
                my $shibSuccess = C4::Context->userenv->{'shibboleth'};
899
                $session->delete();
899
                $session->delete();
900
                $session->flush;
900
                $session->flush;
901
                C4::Context::_unset_userenv($sessionID);
901
                C4::Context::unset_userenv($sessionID);
902
                $sessionID = undef;
902
                $sessionID = undef;
903
903
904
                if ($cas and $caslogout) {
904
                if ($cas and $caslogout) {
Lines 1091-1097 sub checkauth { Link Here
1091
                }
1091
                }
1092
                else {
1092
                else {
1093
                    $info{'nopermission'} = 1;
1093
                    $info{'nopermission'} = 1;
1094
                    C4::Context::_unset_userenv($sessionID);
1094
                    C4::Context::unset_userenv($sessionID);
1095
                }
1095
                }
1096
                my ( $borrowernumber, $firstname, $surname, $userflags,
1096
                my ( $borrowernumber, $firstname, $surname, $userflags,
1097
                    $branchcode, $branchname, $emailaddress, $desk_id,
1097
                    $branchcode, $branchname, $emailaddress, $desk_id,
Lines 1209-1215 sub checkauth { Link Here
1209
            else {
1209
            else {
1210
                if ($userid) {
1210
                if ($userid) {
1211
                    $info{'invalid_username_or_password'} = 1;
1211
                    $info{'invalid_username_or_password'} = 1;
1212
                    C4::Context::_unset_userenv($sessionID);
1212
                    C4::Context::unset_userenv($sessionID);
1213
                }
1213
                }
1214
                $session->param( 'lasttime', time() );
1214
                $session->param( 'lasttime', time() );
1215
                $session->param( 'ip',       $session->remote_addr() );
1215
                $session->param( 'ip',       $session->remote_addr() );
Lines 1671-1677 sub check_cookie_auth { Link Here
1671
    unless ( $sessionID ) {
1671
    unless ( $sessionID ) {
1672
        return ( "failed", undef );
1672
        return ( "failed", undef );
1673
    }
1673
    }
1674
    C4::Context::_unset_userenv($sessionID); # remove old userenv first
1674
    C4::Context::unset_userenv($sessionID); # remove old userenv first
1675
    my $session   = get_session($sessionID);
1675
    my $session   = get_session($sessionID);
1676
    if ($session) {
1676
    if ($session) {
1677
        my $userid   = $session->param('id');
1677
        my $userid   = $session->param('id');
(-)a/C4/InstallAuth.pm (-3 / +2 lines)
Lines 269-275 sub checkauth { Link Here
269
        if ($logout) {
269
        if ($logout) {
270
270
271
            # voluntary logout the user
271
            # voluntary logout the user
272
            C4::Context->_unset_userenv($sessionID);
272
            C4::Context->unset_userenv($sessionID);
273
            $sessionID = undef;
273
            $sessionID = undef;
274
            $userid    = undef;
274
            $userid    = undef;
275
	   # Commented out due to its lack of usefulness
275
	   # Commented out due to its lack of usefulness
Lines 332-338 sub checkauth { Link Here
332
        else {
332
        else {
333
            if ($userid) {
333
            if ($userid) {
334
                $info{'invalid_username_or_password'} = 1;
334
                $info{'invalid_username_or_password'} = 1;
335
                C4::Context->_unset_userenv($sessionID);
335
                C4::Context->unset_userenv($sessionID);
336
            }
336
            }
337
        }
337
        }
338
    }
338
    }
339
- 

Return to bug 29954