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

(-)a/C4/SIP/Sip/MsgType.pm (-3 / +3 lines)
Lines 406-412 sub handle { Link Here
406
#
406
#
407
sub build_patron_status {
407
sub build_patron_status {
408
    my ( $patron, $lang, $fields, $server ) = @_;
408
    my ( $patron, $lang, $fields, $server ) = @_;
409
    my $overdrive_mode = $server->{account}->{'overdrive-mode'};
409
    my $send_msg_on_invalid_credentials = $server->{account}->{'send_msg_on_invalid_credentials'};
410
    my $patron_pwd = $fields->{ (FID_PATRON_PWD) };
410
    my $patron_pwd = $fields->{ (FID_PATRON_PWD) };
411
    my $resp = (PATRON_STATUS_RESP);
411
    my $resp = (PATRON_STATUS_RESP);
412
    my $password_ok = 1;
412
    my $password_ok = 1;
Lines 417-423 sub build_patron_status { Link Here
417
            $password_rc = $patron->check_password($patron_pwd);
417
            $password_rc = $patron->check_password($patron_pwd);
418
            $password_ok = 0 unless $password_rc;
418
            $password_ok = 0 unless $password_rc;
419
        }
419
        }
420
        elsif ( $overdrive_mode
420
        elsif ( $send_msg_on_invalid_credentials
421
            and not exists $fields->{'AL'} # not block_request
421
            and not exists $fields->{'AL'} # not block_request
422
            and not $patron_pwd ) # no password supplied
422
            and not $patron_pwd ) # no password supplied
423
        {
423
        {
Lines 449-455 sub build_patron_status { Link Here
449
        $resp .= maybe_add( FID_PRINT_LINE, $patron->print_line );
449
        $resp .= maybe_add( FID_PRINT_LINE, $patron->print_line );
450
    } else {
450
    } else {
451
451
452
        # Invalid patron id (and/or passwd for overdrive_mode)
452
        # Invalid patron id (and/or passwd for send_msg_on_invalid_credentials)
453
        # Report that the user has no privs.
453
        # Report that the user has no privs.
454
454
455
        # no personal name, and is invalid (if we're using 2.00)
455
        # no personal name, and is invalid (if we're using 2.00)
(-)a/etc/SIPconfig.xml (-2 / +2 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"
46
             send_msg_on_invalid_credentials="1">
46
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
47
          <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?" />
48
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
48
      </login>
49
      </login>
49
- 

Return to bug 13871