24.12. slapi_entry_attr_get_bool()

Gets the value of a given attribute of a given entry as a boolean value.
Syntax

#include "slapi-plugin.h"
char *slapi_entry_attr_get_bool(const Slapi_Entry* e, const char *type);

Parameters

This function takes the following parameters:

e
Entry from which you want to get the boolean value.
type
Attribute type from which you want to get the value.
Returns

This function returns one of the following values:

  • true | false
  • yes | no
  • An integer
Comparisons are case-insensitive (TRUE, true, and true are all the same), and unique substrings can be matched (t and tr will be interpreted as true). If the attribute value is a number, then non-zero numbers are interpreted as true, and 0 is interpreted as false.