Skip to content
Snippets Groups Projects
Commit 6fc7e3ae authored by Robert Lange's avatar Robert Lange Committed by Dorian Merz
Browse files

refs #20776 [finc] remove setMyProfile - use FincILS

* uses vcard and avoid webscraping
* affects de_15, de_zwi2 and de_d13
parent 765f0265
No related merge requests found
...@@ -344,67 +344,6 @@ trait LiberoWachtlTrait ...@@ -344,67 +344,6 @@ trait LiberoWachtlTrait
return $bool; return $bool;
} }
/**
* Change values of users profile.
*
* @param array $inval Associative array of key => value. Keys are:
* - memberCode : User ID returned by patronLogin
* - street : street and number
* - additional : optional address value
* - city : city/village
* - zipCode : location zip code
* - emailAddress : email address
* - reason : reason of change
* @param array $patron Patron data
*
* @return boolean true OK, false FAIL
* @access public
* @throws \Exception Throws ILSException
*/
public function setMyProfile($inval, $patron)
{
$map = self::profileDataMapper(true);
$params = $this->getLiberoWachtlRequestParams();
$params['memberCode'] = $patron['cat_username'];
$params['password'] = $patron['cat_password'];
$data = [];
if (is_array($inval) && (count($inval) > 0)) {
foreach ($inval as $k => $v) {
if (isset($map[$k])) {
$data[$map[$k]] = $v;
} else {
$data[$k] = $v;
}
}
}
$params = array_merge($params, $data);
try {
$result = $this->httpService->get(
$this->getLiberoWachtlUrl() .'setMyProfile.jsp',
$params,
null,
$this->getLiberoWachtlRequestHeaders()
);
} catch (\Exception $e) {
throw new ILSException($e->getMessage());
}
if (!$result->isSuccess()) {
// log error for debugging
$this->debug(
'HTTP status ' . $result->getStatusCode() .
' received'
);
return false;
}
return $this->getLiberoWachtlResultBool($result);
}
/** /**
* Returns Array with profile fields that are never allowed to be edited * Returns Array with profile fields that are never allowed to be edited
* *
......
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