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

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

Return to bug 12954