| | |
| | | |
| | | if (!empty($bind_pass)) { |
| | | if (!empty($bind_dn)) { |
| | | $this->ready = $this->_bind($bind_dn, $bind_pass); |
| | | $this->ready = $this->bind($bind_dn, $bind_pass); |
| | | } |
| | | else if (!empty($this->prop['auth_cid'])) { |
| | | $this->ready = $this->_sasl_bind($this->prop['auth_cid'], $bind_pass, $bind_user); |
| | | $this->ready = $this->sasl_bind($this->prop['auth_cid'], $bind_pass, $bind_user); |
| | | } |
| | | else { |
| | | $this->ready = $this->_sasl_bind($bind_user, $bind_pass); |
| | | $this->ready = $this->sasl_bind($bind_user, $bind_pass); |
| | | } |
| | | } |
| | | } |
| | |
| | | * |
| | | * @return boolean True on success, False on error |
| | | */ |
| | | private function _sasl_bind($authc, $pass, $authz=null) |
| | | public function sasl_bind($authc, $pass, $authz=null) |
| | | { |
| | | if (!$this->conn) { |
| | | return false; |
| | |
| | | * |
| | | * @return boolean True on success, False on error |
| | | */ |
| | | private function _bind($dn, $pass) |
| | | public function bind($dn, $pass) |
| | | { |
| | | if (!$this->conn) { |
| | | return false; |