Commit 13568709 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Du fait que le mode d'authentification LDAP est dés.activable dans la config,...

Du fait que le mode d'authentification LDAP est dés.activable dans la config, levée systématique d'une exception en cas d'erreur LDAP
parent f4b6286f
Pipeline #8905 passed with stage
in 52 seconds
......@@ -15,6 +15,7 @@ use Zend\EventManager\EventInterface;
use Zend\EventManager\EventManager;
use Zend\EventManager\EventManagerAwareInterface;
use Zend\EventManager\EventManagerInterface;
use Zend\Ldap\Exception\LdapException;
use ZfcUser\Authentication\Adapter\ChainableAdapter;
/**
......@@ -216,6 +217,13 @@ class Ldap extends AbstractAdapter implements EventManagerAwareInterface
'result' => $result
]);
$this->getEventManager()->triggerEvent($eventClasse);
$messages = $result->getMessages();
throw new RuntimeException(
"Une erreur est survenue lors de l'authentification LDAP",
null,
new LdapException($this->getLdapAuthAdapter()->getLdap(), array_pop($messages))
);
}
$success = $result->isValid();
......
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