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

(-)a/C4/Auth.pm (-2 / +8 lines)
Lines 967-973 sub checkauth { Link Here
967
                      checkpw( $dbh, $userid, $password, $query );
967
                      checkpw( $dbh, $userid, $password, $query );
968
                    $userid = $retuserid if ($retuserid);
968
                    $userid = $retuserid if ($retuserid);
969
                    $info{'invalid_username_or_password'} = 1 unless ($return);
969
                    $info{'invalid_username_or_password'} = 1 unless ($return);
970
                } }
970
                }
971
            }
972
973
            # $return: 1 = valid user, 2 = superlibrarian
971
            if ($return) {
974
            if ($return) {
972
975
973
                #_session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime));
976
                #_session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime));
Lines 1091-1103 sub checkauth { Link Here
1091
                );
1094
                );
1092
1095
1093
            }
1096
            }
1097
            # $return: 0 = invalid user
1098
            # reset to anonymous session
1094
            else {
1099
            else {
1100
                $debug and warn "Login failed, resetting anonymous session...";
1095
                if ($userid) {
1101
                if ($userid) {
1096
                    $info{'invalid_username_or_password'} = 1;
1102
                    $info{'invalid_username_or_password'} = 1;
1097
                    C4::Context->_unset_userenv($sessionID);
1103
                    C4::Context->_unset_userenv($sessionID);
1098
                }
1104
                }
1099
                $session->param( 'lasttime', time() );
1105
                $session->param( 'lasttime', time() );
1100
                $session->param( 'ip',       $session->remote_addr() );
1106
                $session->param( 'ip',       $session->remote_addr() );
1107
                $session->param( 'sessiontype', 'anon' );
1101
            }
1108
            }
1102
        }    # END if ( $userid    = $query->param('userid') )
1109
        }    # END if ( $userid    = $query->param('userid') )
1103
        elsif ( $type eq "opac" ) {
1110
        elsif ( $type eq "opac" ) {
1104
- 

Return to bug 12954