Fix ldapDriver instantiation

This commit is contained in:
Florian Schlichting 2017-01-17 23:36:05 +01:00
parent 364bbd1df5
commit 6edd828803

View File

@ -261,16 +261,16 @@ function getStaticLdap() {
// If the instance is not there, create one
if(!isset($instance)) {
$ldapDrivers = new ldapDrivers($c->authenticate_hook['config']);
$ldapDriver = new ldapDriver($c->authenticate_hook['config']);
if ($ldapDrivers->valid) {
$instance = $ldapDrivers;
if ($ldapDriver->valid) {
$instance = $ldapDriver;
}
}
else {
$ldapDrivers = $instance;
$ldapDriver = $instance;
}
return $ldapDrivers;
return $ldapDriver;
}