- Method
compare
int compare(string dn, string attr, string value)
- Description
Compares an attribute value with one in the directory.
- Parameter dn
The distinguished name of the entry.
- Parameter attr
The type (aka name) of the attribute to compare.
- Parameter value
The value to compare with. It's UTF-8 encoded automatically if
the attribute syntax specifies that.
- Returns
Returns 1
if at least one of the values for the
attribute in the directory is equal to value , 0
if
it didn't match or there was some error (use error_number to
find out).
- Note
This function has changed arguments since version 7.6. From
7.3 to 7.6 it was effectively useless since it always returned
true.
- Note
The equality matching rule for the attribute governs the
comparison. There are attributes where the assertion syntax
used here isn't the same as the attribute value syntax.