Skip to content
Snippets Groups Projects
Commit 17557624 authored by Laura Hild's avatar Laura Hild Committed by Demian Katz
Browse files

Symphony: properly report patronLogin failure

parent dd152fff
No related merge requests found
...@@ -968,18 +968,28 @@ class Symphony extends AbstractBase implements ServiceLocatorAwareInterface ...@@ -968,18 +968,28 @@ class Symphony extends AbstractBase implements ServiceLocatorAwareInterface
'cat_password' => $password, 'cat_password' => $password,
); );
$resp = $this->makeRequest( try {
'patron', $resp = $this->makeRequest(
'lookupMyAccountInfo', 'patron',
array( 'lookupMyAccountInfo',
'includePatronInfo' => 'true', array(
'includePatronAddressInfo' => 'true' 'includePatronInfo' => 'true',
), 'includePatronAddressInfo' => 'true'
array( ),
'login' => $username, array(
'password' => $password, 'login' => $username,
) 'password' => $password,
); )
);
} catch (SoapFault $e) {
$unableToLogin = 'ns0:com.sirsidynix.symws.service.'
. 'exceptions.SecurityServiceException.unableToLogin';
if ($e->faultcode == $unableToLogin) {
return null;
} else {
throw $e;
}
}
$patron['id'] = $resp->patronInfo->$usernameField; $patron['id'] = $resp->patronInfo->$usernameField;
$patron['library'] = $resp->patronInfo->patronLibraryID; $patron['library'] = $resp->patronInfo->patronLibraryID;
......
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