You are here

public function SimpleLdapServer::compare in Simple LDAP 7.2

Same name and namespace in other branches
  1. 7 SimpleLdapServer.class.php \SimpleLdapServer::compare()

Compare the given attribute value with what is in the LDAP server.

@throw SimpleLdapException

Parameters

string $dn: The distinguished name of an LDAP entity.

string $attribute: The attribute name.

string $value: The compared value.

Return value

boolen TRUE if value matches otherwise returns FALSE.

File

./SimpleLdapServer.class.php, line 464
Class to handle LDAP server connections and related operations.

Class

SimpleLdapServer
Simple LDAP server class.

Code

public function compare($dn, $attribute, $value) {

  // Make sure there is a valid binding.
  $this
    ->bind();

  // Do the comparison.
  return SimpleLdap::ldap_compare($this->resource, $dn, $attribute, $value);
}