Refactored ldap parameters

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2021-02-14 16:49:02 +01:00
parent 2c05ccc517
commit e136bbbcb6
4 changed files with 11 additions and 6 deletions

View File

@ -6,9 +6,9 @@ class LDAP {
private $link;
private $bind;
public function __construct($ldaphost, $ldapport, $binddn, $bindpw) {
public function __construct($ldaphost, $binddn, $bindpw) {
$this->link = ldap_connect($ldaphost, $ldapport) or exit('Error: ldap_connect()');
$this->link = ldap_connect($ldaphost) or exit('Error: ldap_connect()');
ldap_set_option($this->link, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($this->link, LDAP_OPT_REFERRALS, 0);