Skip to content
Snippets Groups Projects
Commit 13a147ed authored by llaffont's avatar llaffont
Browse files

Correction authentification Aloes avec utilisateur existant qui a changé de...

Correction authentification Aloes avec utilisateur existant qui a changé de mot de passe dans le SIGB + mise à jour temps réel
parent febd5ca3
Branches
Tags
No related merge requests found
......@@ -56,9 +56,10 @@ class ZendAfi_Auth_Adapter_CommSigb implements Zend_Auth_Adapter_Interface {
else
$user = Class_Users::newInstance()
->setLogin($this->_identity)
->setPassword($this->_credential)
->beAbonneSIGB();
$user->setPassword($this->_credential);
$result = $this->authenticateUserFromSIGB($user);
if ($result->isValid())
$this->_authenticated_user = $user;
......
......@@ -162,7 +162,7 @@ class AuthCommSigbSuccessfullAuthenticationWithExistingUserTest extends AuthComm
->answers([$this->_zork = Class_Users::newInstanceWithId(4)
->setDateFin('2010-10-23')
->setLogin('zork_sigb')
->setPassword('secret')]);
->setPassword('xzy')]);
$this->_adapter = (new ZendAfi_Auth_Adapter_CommSigb())
->setIdentity('zork_sigb')
......@@ -188,6 +188,12 @@ class AuthCommSigbSuccessfullAuthenticationWithExistingUserTest extends AuthComm
public function zorkDateFinShouldBeUpdatedTo2015_12_25() {
$this->assertEquals('2015-12-25', $this->_zork->getDateFin());
}
/** @test */
public function zorkPasswordShouldBeSecret() {
$this->assertEquals('secret', $this->_zork->getPassword());
}
}
......
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