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

Adapter auth LDAP : correction exception levée à tort

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