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) |