Lines 940-945
sub handle_patron_info {
Link Here
|
940 |
|
940 |
|
941 |
$resp = (PATRON_INFO_RESP); |
941 |
$resp = (PATRON_INFO_RESP); |
942 |
if ($patron) { |
942 |
if ($patron) { |
|
|
943 |
# Bug 16694 - Limit SIP2 auth by patron attribute |
944 |
# If login account has validate_patron_attribute set, it will check if patron has this attribute set |
945 |
# If set to 1 or authorized value mapped to 1, allow access (charge and renewal privileges ok) |
946 |
if ($server->{account}->{validate_patron_attribute}) { |
947 |
my $attr = C4::Members::Attributes::GetBorrowerAttributeValue($patron->{borrowernumber}, $server->{account}->{validate_patron_attribute}); |
948 |
if ($attr || $attr == "1") { |
949 |
$patron->{charge_ok} = "1"; |
950 |
$patron->{renew_ok} = "1"; |
951 |
} |
952 |
} |
953 |
|
943 |
$resp .= patron_status_string($patron); |
954 |
$resp .= patron_status_string($patron); |
944 |
$resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language; |
955 |
$resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language; |
945 |
$resp .= timestamp(); |
956 |
$resp .= timestamp(); |