Commit 8be25bbdebc5b8a44ba911d0d330ad3d9f6bb7b4
1 parent
78569c51
added ability to specific an array of ldapServers in the constructor
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2460 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
2 deletions
lib/authentication/class.AuthLdap.php
| ... | ... | @@ -100,8 +100,12 @@ class AuthLdap { |
| 100 | 100 | * @param string the username to authenticate with when searching if anonymous binding is not supported |
| 101 | 101 | * @param string the password to authenticate with when searching if anonymous binding is not supported |
| 102 | 102 | */ |
| 103 | - function AuthLdap ($sLdapServer, $sBaseDN, $sServerType, $sDomain = "", $searchUser = "", $searchPassword = "") { | |
| 104 | - $this->server = array($sLdapServer); | |
| 103 | + function AuthLdap ($aLdapServers, $sBaseDN, $sServerType, $sDomain = "", $searchUser = "", $searchPassword = "") { | |
| 104 | + if (is_string($aLdapServers)) { | |
| 105 | + $this->server = array($aLdapServers); | |
| 106 | + } elseif (is_array($aLdapServers)) { | |
| 107 | + $this->server = $aLdapServers; | |
| 108 | + } | |
| 105 | 109 | $this->dn = $sBaseDN; |
| 106 | 110 | $this->serverType = $sServerType; |
| 107 | 111 | $this->domain = $sDomain; | ... | ... |