diff --git a/module/finc/src/finc/ILS/Driver/FincILS.php b/module/finc/src/finc/ILS/Driver/FincILS.php index 3ab786cc25cf9353d0aa01ddab75ae89d995cd8b..4811e178b43089a69e642fddb24726b1f5c67ee4 100644 --- a/module/finc/src/finc/ILS/Driver/FincILS.php +++ b/module/finc/src/finc/ILS/Driver/FincILS.php @@ -515,7 +515,6 @@ class FincILS extends PAIA implements LoggerAwareInterface if (isset($patron['address'])) { try { $vcard = VObject\Reader::read($patron['address']); - if (isset($vcard->ADR)) { foreach ($vcard->ADR as $adr) { $address[( @@ -540,6 +539,10 @@ class FincILS extends PAIA implements LoggerAwareInterface if (isset($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'})) { $editable = $this->getEditableProfileFields( (string)$vcard->{'X-LIBRARY-ILS-PATRON-EDIT-ALLOW'} @@ -594,12 +597,14 @@ class FincILS extends PAIA implements LoggerAwareInterface // PAIA specific custom values 'expires' => isset($patron['expires']) ? $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), // fincILS and PAIA specific custom values - 'email' => !empty($patron['email']) ? - $patron['email'] : (!empty($emails[0]) ? $emails[0] : null), - 'editableFields' => (!empty($editable)) ? $editable : null + 'email' => !empty($patron['email']) + ? $patron['email'] : (!empty($emails[0]) ? $emails[0] : null), + 'editableFields' => (!empty($editable)) ? $editable : null, + 'home_library' => (!empty($home_library)) ? $home_library : null ]; return (isset($profile)) ? array_merge($idm, $profile) : $idm; diff --git a/module/finc/src/finc/ILS/Driver/PAIA.php b/module/finc/src/finc/ILS/Driver/PAIA.php index 3da0a278cc08d3b1f957ad3482ce950afe99b21d..0a206b2583c4eeb4c7188656a00554681dc91647 100644 --- a/module/finc/src/finc/ILS/Driver/PAIA.php +++ b/module/finc/src/finc/ILS/Driver/PAIA.php @@ -320,15 +320,16 @@ class PAIA extends \VuFind\ILS\Driver\PAIA //todo: make fields more configurable if (is_array($patron)) { return [ - 'firstname' => $patron['firstname'], - 'lastname' => $patron['lastname'], - 'address1' => null, - 'address2' => null, - 'city' => null, - 'country' => null, - 'zip' => null, - 'phone' => null, - 'group' => null, + 'firstname' => $patron['firstname'], + 'lastname' => $patron['lastname'], + 'address1' => null, + 'address2' => null, + 'city' => null, + 'country' => null, + 'zip' => null, + 'phone' => null, + 'group' => null, + 'home_library' => null, // PAIA specific custom values 'expires' => isset($patron['expires']) ? $this->convertDate($patron['expires']) : null,