diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index a6f7211f..1c080467 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -254,7 +254,10 @@ function getStaticLdap() { // If the instance is not there, create one if(!isset($instance)) { $ldapDrivers = new ldapDrivers($c->authenticate_hook['config']); - $instance = $ldapDrivers + + if ($ldapDrivers->valid) { + $instance = $ldapDrivers + } } else { $ldapDrivers = $instance