Commit 0aee6b10 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction bug survenu avec le module ZfcUser 0.1.3.

parent a19f7e00
......@@ -57,6 +57,10 @@ class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, Event
*/
public function authenticate(AuthEvent $e)
{
if ($e->getIdentity()) {
return;
}
$config = $this->getOptions()->getCas();
if (!$config) {
return; // NB: l'authentification CAS est désactivée ssi le tableau des options est vide
......@@ -82,10 +86,6 @@ class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, Event
->setMessages(array('Authentication successful.'));
$this->getEventManager()->trigger('userAuthenticated', $e);
$e->stopPropagation();
return true;
}
/**
......
......@@ -32,6 +32,10 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceManagerAwa
*/
public function authenticate(AuthEvent $e)
{
if ($e->getIdentity()) {
return;
}
try {
$result = parent::authenticate($e);
}
......
......@@ -108,10 +108,6 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even
->setMessages(array('Authentication successful.'));
$this->getEventManager()->trigger('userAuthenticated', $e);
$e->stopPropagation();
return true;
}
/**
......
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