Reuse ldap connections for the default config
This commit is contained in:
parent
6a505da981
commit
6d69d89cfe
@ -160,6 +160,10 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
|
||||
|
||||
function ldap_get_connection($config = null){
|
||||
if($config == null){
|
||||
static $ldap = null;
|
||||
if($ldap != null){
|
||||
return $ldap;
|
||||
}
|
||||
$config = $this->ldap_get_config();
|
||||
}
|
||||
|
||||
|
@ -159,6 +159,10 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
|
||||
//-----the below function were copied from LDAPAuthenticationPlugin. They will be moved to a utility class soon.----\\
|
||||
function ldap_get_connection($config = null){
|
||||
if($config == null){
|
||||
static $ldap = null;
|
||||
if($ldap != null){
|
||||
return $ldap;
|
||||
}
|
||||
$config = $this->ldap_get_config();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user