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
parent 72dc5b1f39
commit 953b922a13

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;
}