The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit b30f81b7 authored by Frank Morgner's avatar Frank Morgner
Browse files

refs #12533

* match vcard field X-LIBRARY-BORROWER_BRANCH to home_libary
** insufficent due to overwriting in profileAction() VuFind\..\MyResearchController
parent 9f06eb94
No related merge requests found
...@@ -515,7 +515,6 @@ class FincILS extends PAIA implements LoggerAwareInterface ...@@ -515,7 +515,6 @@ class FincILS extends PAIA implements LoggerAwareInterface
if (isset($patron['address'])) { if (isset($patron['address'])) {
try { try {
$vcard = VObject\Reader::read($patron['address']); $vcard = VObject\Reader::read($patron['address']);
if (isset($vcard->ADR)) { if (isset($vcard->ADR)) {
foreach ($vcard->ADR as $adr) { foreach ($vcard->ADR as $adr) {
$address[( $address[(
...@@ -540,6 +539,10 @@ class FincILS extends PAIA implements LoggerAwareInterface ...@@ -540,6 +539,10 @@ class FincILS extends PAIA implements LoggerAwareInterface
if (isset($vcard->ROLE)) { if (isset($vcard->ROLE)) {
$group = (string)$vcard->ROLE; $group = (string)$vcard->ROLE;
} }
if (isset($vcard->{'X-LIBRARY-BORROWER-BRANCH'})) {
$home_library
= (string)$vcard->{'X-LIBRARY-BORROWER-BRANCH'};
}
if (isset($vcard->{'X-LIBRARY-ILS-PATRON-EDIT-ALLOW'})) { if (isset($vcard->{'X-LIBRARY-ILS-PATRON-EDIT-ALLOW'})) {
$editable = $this->getEditableProfileFields( $editable = $this->getEditableProfileFields(
(string)$vcard->{'X-LIBRARY-ILS-PATRON-EDIT-ALLOW'} (string)$vcard->{'X-LIBRARY-ILS-PATRON-EDIT-ALLOW'}
...@@ -594,12 +597,14 @@ class FincILS extends PAIA implements LoggerAwareInterface ...@@ -594,12 +597,14 @@ class FincILS extends PAIA implements LoggerAwareInterface
// PAIA specific custom values // PAIA specific custom values
'expires' => isset($patron['expires']) 'expires' => isset($patron['expires'])
? $this->convertDate($patron['expires']) : null, ? $this->convertDate($patron['expires']) : null,
'statuscode' => isset($patron['status']) ? $patron['status'] : null, 'statuscode' => isset($patron['status'])
? $patron['status'] : null,
'canWrite' => in_array(self::SCOPE_WRITE_ITEMS, $this->getSession()->scope), 'canWrite' => in_array(self::SCOPE_WRITE_ITEMS, $this->getSession()->scope),
// fincILS and PAIA specific custom values // fincILS and PAIA specific custom values
'email' => !empty($patron['email']) ? 'email' => !empty($patron['email'])
$patron['email'] : (!empty($emails[0]) ? $emails[0] : null), ? $patron['email'] : (!empty($emails[0]) ? $emails[0] : null),
'editableFields' => (!empty($editable)) ? $editable : null 'editableFields' => (!empty($editable)) ? $editable : null,
'home_library' => (!empty($home_library)) ? $home_library : null
]; ];
return (isset($profile)) ? array_merge($idm, $profile) : $idm; return (isset($profile)) ? array_merge($idm, $profile) : $idm;
......
...@@ -320,15 +320,16 @@ class PAIA extends \VuFind\ILS\Driver\PAIA ...@@ -320,15 +320,16 @@ class PAIA extends \VuFind\ILS\Driver\PAIA
//todo: make fields more configurable //todo: make fields more configurable
if (is_array($patron)) { if (is_array($patron)) {
return [ return [
'firstname' => $patron['firstname'], 'firstname' => $patron['firstname'],
'lastname' => $patron['lastname'], 'lastname' => $patron['lastname'],
'address1' => null, 'address1' => null,
'address2' => null, 'address2' => null,
'city' => null, 'city' => null,
'country' => null, 'country' => null,
'zip' => null, 'zip' => null,
'phone' => null, 'phone' => null,
'group' => null, 'group' => null,
'home_library' => null,
// PAIA specific custom values // PAIA specific custom values
'expires' => isset($patron['expires']) 'expires' => isset($patron['expires'])
? $this->convertDate($patron['expires']) : null, ? $this->convertDate($patron['expires']) : null,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment