Commit 922df881 authored by Bertrand Gauthier's avatar Bertrand Gauthier

Adapter auth LDAP : correction exception levée à tort

parent f40a5f90
......@@ -208,7 +208,7 @@ class Ldap extends AbstractAdapter implements EventManagerAwareInterface
// LDAP auth
$result = $this->getLdapAuthAdapter()->setUsername($username)->setPassword($credential)->authenticate();
if ($result && count($result->getMessages())) {
if ($result && !$result->isValid() && count($result->getMessages())) {
// Obtenir le message LDAP
// $msg = preg_replace('/\[0x\d* \((.*)\):/','$1', $event->getParam('result')->getMessages()[1]);
$eventClasse = new Event('authentication.ldap.error');
......
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