Lines Matching refs:con

17     /* @var resource $con holds the LDAP connection */
18 protected $con;
68 if (!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))) {
69 $this->debug('LDAP bind as superuser: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
89 } elseif (!@ldap_bind($this->con)) {
92 $this->debug('LDAP anonymous bind: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
99 if (!@ldap_bind($this->con, $dn, $pass)) {
101 $this->debug('LDAP user dn bind: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
116 if (!@ldap_bind($this->con, $dn, $pass)) {
118 $this->debug('LDAP user bind: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
172 if (!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))) {
173 $this->debug('LDAP bind as superuser: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
206 $sr = $this->ldapSearch($this->con, $base, $filter, $this->getConf('userscope'), $this->getConf('attributes'));
207 $this->debug('LDAP user search: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
213 $result = @ldap_get_entries($this->con, $sr);
277 $this->con,
283 $this->debug('LDAP group search: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
290 $result = ldap_get_entries($this->con, $sr);
328 $this->debug('LDAP cannot connect: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
347 if (!@ldap_bind($this->con, $dn, $pass)) {
349 'LDAP user bind failed: ' . hsc($dn) . ': ' . hsc(ldap_error($this->con)),
359 if (!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))) {
360 $this->debug('LDAP bind as superuser: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
372 if (!@ldap_mod_replace($this->con, $dn, ['userpassword' => $hash])) {
374 'LDAP mod replace failed: ' . hsc($dn) . ': ' . hsc(ldap_error($this->con)),
415 $sr = ldap_search($this->con, $this->getConf('usertree'), $all_filter);
416 $entries = ldap_get_entries($this->con, $sr);
541 if ($this->con) return true; // connection already established
554 $this->con = @ldap_connect($server, $port);
555 if (!$this->con) {
571 $this->con,
577 $this->debug('LDAP version set: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
581 if (!@ldap_start_tls($this->con)) {
583 $this->debug('LDAP TLS set: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
590 $this->con,
596 $this->debug('LDAP referal set: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
604 if (!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->getConf('deref'))) {
606 $this->debug('LDAP deref set: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__);
611 ldap_set_option($this->con, LDAP_OPT_NETWORK_TIMEOUT, 1);
615 $bound = @ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')));
618 $bound = @ldap_bind($this->con);
627 $this->debug(ldap_error($this->con), 0, __LINE__, __FILE__);