From 5d82b1a60ada07dd746198001f6fed8c39c710a0 Mon Sep 17 00:00:00 2001 From: Ere Maijala <ere.maijala@helsinki.fi> Date: Wed, 21 Mar 2018 09:13:36 +0200 Subject: [PATCH] Fix SierraRest::patronLogin to return name and email properly. --- module/VuFind/src/VuFind/ILS/Driver/SierraRest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php b/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php index cd9c9fcc7fb..2d7174af27d 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php +++ b/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php @@ -379,7 +379,7 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface, $result = $this->makeRequest( ['v3', 'patrons', $patronId], - [], + ['fields' => 'names,emails'], 'GET', ['cat_username' => $username, 'cat_password' => $password] ); @@ -399,7 +399,7 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface, 'lastname' => $lastname, 'cat_username' => $username, 'cat_password' => $password, - 'email' => '', + 'email' => !empty($result['emails']) ? $result['emails'][0] : '', 'major' => null, 'college' => null ]; -- GitLab