Commit b70fc572 authored by Laurent's avatar Laurent

Merge branch 'hotline#83674_probleme_webservices_portail' into 'hotline'

hotline #83674 : do not use idabon as login in Opsys connector anymore

See merge request !2944
parents 63a8f142 0e5df57a
Pipeline #5839 failed with stage
in 27 minutes and 25 seconds
- ticket #83674 : SIGB Opsys : Correction de l'identification qui se faisait sur l'idabon lorsqu'il était disponible
\ No newline at end of file
......@@ -231,9 +231,8 @@ class Class_WebService_SIGB_Opsys_Service extends Class_WebService_SIGB_Abstract
* @return Class_WebService_SIGB_Emprunteur
*/
public function authentifierEmprunteur($user) {
$auth = new EmprAuthentifier($this->guid,
$user->hasIdabon() ? $user->getIdabon() : $user->getLogin(),
$user->getPassword());
$auth = new EmprAuthentifier($this->guid, $user->getLogin(), $user->getPassword());
try {
$auth_result = $this->search_client->EmprAuthentifier($auth);
} catch (Exception $e) {
......@@ -254,7 +253,6 @@ class Class_WebService_SIGB_Opsys_Service extends Class_WebService_SIGB_Abstract
$emprunteur->setEndDate($date_fin_abonnement);
}
if ($date_naissance = $entite_result->findAttribute('DateNaissance')) {
$date_naissance = implode('-', array_reverse(explode('/', $date_naissance)));
$emprunteur->setDateNaissance($date_naissance);
......
......@@ -1688,13 +1688,13 @@ class OpsysServiceEmprAuthentifierParamsTest extends OpsysServiceWithSessionTest
/** @test */
public function withLoginAndIdAbonAuthentifierShouldUseIdabon() {
public function withLoginAndIdAbonAuthentifierShouldUseLoginAlso() {
$this->opsys->getEmprunteur(
Class_Users::newInstance(['login' => 'tintin',
'password' => '1234',
'idabon' => 'vol777']));
$this->assertEquals('vol777', $this->auth_request->Param->IDEmprunteur);
$this->assertEquals('tintin', $this->auth_request->Param->IDEmprunteur);
}
}
......
Markdown is supported
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