Instance caching added

There was already a variable to cache the ldap driver instance, and a
check if this variable was already set was there, too! But there was no
code to return the cached instance if the function gets called twice!

Maybe this was simply forgotten...
This commit is contained in:
Matthias Beyer 2013-09-19 11:07:14 +02:00 committed by Andrew McMillan
parent f3b67a2c62
commit 40c87435c1

View File

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