/**
  * Compare the given attribute value with what is in the LDAP server.
  *
  * @param string $dn
  *   The distinguished name of an LDAP entity.
  * @param string $attribute
  *   The attribute name.
  * @param string $value
  *   The compared value.
  *
  * @return boolen
  *   TRUE if value matches otherwise returns FALSE.
  *
  * @throw SimpleLdapException
  */
 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);
 }