summaryrefslogtreecommitdiff
path: root/plugins/LdapAuthentication/LdapAuthenticationPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/LdapAuthentication/LdapAuthenticationPlugin.php')
-rw-r--r--plugins/LdapAuthentication/LdapAuthenticationPlugin.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php
index f688a3f7e..0ce08bd78 100644
--- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php
+++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php
@@ -174,6 +174,15 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
return false;
}
if($config == null) $this->default_ldap=$ldap;
+
+ if (isset($this->schema_cachefile)) {
+ $cacheConfig = array(
+ 'path' => $this->schema_cachefile,
+ 'max_age' => (isset($this->schema_maxage) ? $this->schema_maxage : 1200 )
+ );
+ $cacheObj = new Net_LDAP2_SimpleFileSchemaCache($cacheConfig);
+ $ldap->registerSchemaCache($cacheObj);
+ }
return $ldap;
}