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

(-)a/C4/SIP/Sip/MsgType.pm (-7 / +7 lines)
Lines 448-454 sub build_patron_status { Link Here
448
            $resp .= add_field( FID_VALID_PATRON, 'Y' );
448
            $resp .= add_field( FID_VALID_PATRON, 'Y' );
449
449
450
            # Patron password is a required field.
450
            # Patron password is a required field.
451
            $resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) ) );
451
            $resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) || $server->{account}->{no_password_mode} ) );
452
            $resp .= maybe_add( FID_CURRENCY, $patron->currency );
452
            $resp .= maybe_add( FID_CURRENCY, $patron->currency );
453
            $resp .= maybe_add( FID_FEE_AMT,  $patron->fee_amount );
453
            $resp .= maybe_add( FID_FEE_AMT,  $patron->fee_amount );
454
        }
454
        }
Lines 603-610 sub handle_checkout { Link Here
603
603
604
                # Password provided, so we can tell if it was valid or not
604
                # Password provided, so we can tell if it was valid or not
605
                $resp .=
605
                $resp .=
606
                  add_field( FID_VALID_PATRON_PWD,
606
                  add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password( $fields->{ (FID_PATRON_PWD) } ) || $server->{account}->{no_password_mode} ) );
607
                    sipbool( $patron->check_password( $fields->{ (FID_PATRON_PWD) } ) ) );
608
            }
607
            }
609
        }
608
        }
610
    }
609
    }
Lines 984-991 sub handle_patron_info { Link Here
984
        $resp .= add_field(FID_VALID_PATRON, 'Y');
983
        $resp .= add_field(FID_VALID_PATRON, 'Y');
985
        if (defined($patron_pwd)) {
984
        if (defined($patron_pwd)) {
986
            # If patron password was provided, report whether it was right or not.
985
            # If patron password was provided, report whether it was right or not.
987
            $resp .= add_field(FID_VALID_PATRON_PWD,
986
            $resp .=
988
                sipbool($patron->check_password($patron_pwd)));
987
              add_field( FID_VALID_PATRON_PWD,
988
                sipbool( $patron->check_password($patron_pwd) || $server->{account}->{no_password_mode} ) );
989
        }
989
        }
990
990
991
        $resp .= maybe_add(FID_CURRENCY,   $patron->currency);
991
        $resp .= maybe_add(FID_CURRENCY,   $patron->currency);
Lines 1244-1250 sub handle_patron_enable { Link Here
1244
    }
1244
    }
1245
    else {
1245
    else {
1246
        # valid patron
1246
        # valid patron
1247
        if ( !defined($patron_pwd) || $patron->check_password($patron_pwd) ) {
1247
        if ( !defined($patron_pwd) || $patron->check_password($patron_pwd) || || $server->{account}->{no_password_mode} ) {
1248
1248
1249
            # Don't enable the patron if there was an invalid password
1249
            # Don't enable the patron if there was an invalid password
1250
            $status = $patron->enable;
1250
            $status = $patron->enable;
Lines 1255-1261 sub handle_patron_enable { Link Here
1255
        $resp .= add_field( FID_PATRON_ID,     $patron->id );
1255
        $resp .= add_field( FID_PATRON_ID,     $patron->id );
1256
        $resp .= add_field( FID_PERSONAL_NAME, $patron->name );
1256
        $resp .= add_field( FID_PERSONAL_NAME, $patron->name );
1257
        if ( defined($patron_pwd) ) {
1257
        if ( defined($patron_pwd) ) {
1258
            $resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) ) );
1258
            $resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) || $server->{account}->{no_password_mode} ) );
1259
        }
1259
        }
1260
        $resp .= add_field( FID_VALID_PATRON, 'Y' );
1260
        $resp .= add_field( FID_VALID_PATRON, 'Y' );
1261
        $resp .= maybe_add( FID_SCREEN_MSG, $patron->screen_msg, $server );
1261
        $resp .= maybe_add( FID_SCREEN_MSG, $patron->screen_msg, $server );
(-)a/etc/SIPconfig.xml (-2 / +1 lines)
Lines 42-48 Link Here
42
      <login id="lpl-sc" password="1234" institution="LPL" />
42
      <login id="lpl-sc" password="1234" institution="LPL" />
43
      <login id="lpl-sc-beacock" password="xyzzy"
43
      <login id="lpl-sc-beacock" password="xyzzy"
44
             delimiter="|" error-detect="enabled" institution="LPL"
44
             delimiter="|" error-detect="enabled" institution="LPL"
45
             send_patron_home_library_in_af="1" >
45
             send_patron_home_library_in_af="1" no_password_mode="1">
46
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
46
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
47
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
47
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
48
      </login>
48
      </login>
49
- 

Return to bug 15124