<accounts>
<login id="scclient" password="clientpwd" institution="gapines"/>
+ <login id="cmptrlab" password="clientpwd" institution="gapines" want_patron_ok="true"/>
</accounts>
<!-- Institution tags will hold stuff used to interface to -->
my $self = shift;
my $key = (@_ > 1) ? shift : 'barcode'; # if we have multiple args, the first is the key index (default barcode)
my $patron_id = shift;
+ # want_patron_ok is per-login depending on the needs of your selfcheck or PC management systems.
+ my $want_patron_ok = ( $self->{login}->{want_patron_ok} && $self->{login}->{want_patron_ok} =~ /true|yes|enabled/i );
$self->verify_session;
- return OpenILS::SIP::Patron->new($key => $patron_id, authtoken => $self->{authtoken}, @_);
+ return OpenILS::SIP::Patron->new($key => $patron_id, authtoken => $self->{authtoken}, want_ok => $want_patron_ok, @_);
}
$self->{id} = ($key eq 'barcode') ? $patron_id : $user->card->barcode; # The barcode IS the ID to SIP.
# We give back the passed barcode if the key was indeed a barcode, just to be safe. Otherwise pull it from the card.
+ # Return 'OK' in the screen message? Likely used primarily by PC management systems.
+ $self->{want_ok} = $args{want_ok};
+
syslog("LOG_DEBUG", "OILS: new OpenILS Patron(%s => %s): found patron : barred=%s, card:active=%s",
$key, $patron_id, $user->barred, $user->card->active );
my $expire = DateTime::Format::ISO8601->new->parse_datetime(clean_ISO8601($u->expire_date));
return $b if CORE::time > $expire->epoch;
- return '';
+ return ($self->{want_ok} ? 'OK' : '');
}
sub print_line { # not implemented