From 8be25bbdebc5b8a44ba911d0d330ad3d9f6bb7b4 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 31 Jul 2003 09:35:58 +0000 Subject: [PATCH] added ability to specific an array of ldapServers in the constructor --- lib/authentication/class.AuthLdap.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/authentication/class.AuthLdap.php b/lib/authentication/class.AuthLdap.php index 9282daa..ac7cd16 100644 --- a/lib/authentication/class.AuthLdap.php +++ b/lib/authentication/class.AuthLdap.php @@ -100,8 +100,12 @@ class AuthLdap { * @param string the username to authenticate with when searching if anonymous binding is not supported * @param string the password to authenticate with when searching if anonymous binding is not supported */ - function AuthLdap ($sLdapServer, $sBaseDN, $sServerType, $sDomain = "", $searchUser = "", $searchPassword = "") { - $this->server = array($sLdapServer); + function AuthLdap ($aLdapServers, $sBaseDN, $sServerType, $sDomain = "", $searchUser = "", $searchPassword = "") { + if (is_string($aLdapServers)) { + $this->server = array($aLdapServers); + } elseif (is_array($aLdapServers)) { + $this->server = $aLdapServers; + } $this->dn = $sBaseDN; $this->serverType = $sServerType; $this->domain = $sDomain; -- libgit2 0.21.4