Skip to content
Snippets Groups Projects
Verified Commit bfd27593 authored by Damien's avatar Damien
Browse files

FEAT #13695 TIME 0:20 Fix ldap with malformed config

parent 9a60db8a
No related branches found
No related tags found
No related merge requests found
......@@ -380,7 +380,7 @@ class AuthenticationController
$password = $args['password'];
$ldapConfigurations = CoreConfigModel::getXmlLoaded(['path' => 'modules/ldap/xml/config.xml']);
if (empty($ldapConfigurations)) {
if (empty($ldapConfigurations) || empty($ldapConfigurations->config->ldap)) {
return ['errors' => 'No ldap configurations'];
}
......@@ -430,7 +430,7 @@ class AuthenticationController
if (empty($authenticated) && !empty($error) && $error != 'Invalid credentials') {
return ['errors' => $error];
} elseif (empty($authenticated) && !empty($error) && $error == 'Invalid credentials') {
} elseif (empty($authenticated)) {
return ['errors' => 'Authentication Failed'];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment