This function will check whether the value for an attribute being changed
is already assigned to another DN. Returns the bad value, or null if all values are OK
Arguments
Name
Type
Description
Default
$dn
n/a
$attrs
n/a
Return value
Type
Description
n/a
n/a
delete(
$dn,
$method
= null,
)
:
n/a
Description
Delete objects
Arguments
Name
Type
Description
Default
$dn
n/a
$method
n/a
null
Return value
Type
Description
n/a
n/a
isAnonBindAllowed(
)
:
boolean
Description
Fetch whether the user has configured a certain server login to be non anonymous
$servers->setValue('login','anon_bind',true|false);
Return value
Type
Description
boolean
isAttrHidden(
$attr,
)
:
boolean
Description
Returns true if the specified attribute is configured as hidden
in config.php. Attributes are configured as hidden in config.php thus:
$config->custom->appearance['hide_attrs'] = array('objectClass');
Arguments
Name
Type
Description
Default
$attr
n/a
Return value
Type
Description
boolean
isAttrReadOnly(
$attr,
)
:
boolean
Description
Returns true if the specified attribute is configured as read only
in config.php. Attributes are configured as read-only in config.php thus:
$config->custom->appearance['readonly_attrs'] = array('objectClass');
Returns true if the specified attribute is configured according to
the test enabled in config.php
Arguments
Name
Type
Description
Default
$attr
n/a
$attrs
n/a
$except_dn
n/a
Return value
Type
Description
boolean
isAttrUnique(
string
$attr,
)
:
boolean
Description
Returns true if the specified attribute is configured as unique
in config.php. Attributes are configured as hidden in config.php thus:
$servers->setValue('unique','attrs',array('mail','uid','uidNumber'));
Arguments
Name
Type
Description
Default
$attr
string
The name of the attribute to test.
Return value
Type
Description
boolean
isBranchRenameEnabled(
)
:
boolean
Description
Returns true if the user has configured the specified server to enable branch (non-leaf) renames. This is configured in config.php thus:
$servers->setValue('server','branch_rename',true|false);
Determines if an attribute's value can contain multiple lines. Attributes that fall
in this multi-line category may be configured in config.php. Hence, this function
accesses the global variable $_SESSION[APPCONFIG]->custom->appearance['multi_line_attributes']; Usage example:
if ($ldapserver->isMultiLineAttr('postalAddress'))
echo '';
else
echo '';
Arguments
Name
Type
Description
Default
$attr_name
n/a
$val
n/a
null
Return value
Type
Description
boolean
isSessionValid(
)
:
n/a
Description
Check if the session timeout has occured for this LDAP server.
Return value
Type
Description
n/a
n/a
isShowCreateEnabled(
)
:
boolean
Description
Gets whether the admin has configured phpLDAPadmin to show the "Create New" link in the tree viewer.
$servers->setValue('appearance','show_create',true|false);
If NOT set, then default to show the Create New item.
If IS set, then return the value (it should be true or false).
The entry creation command must be available.
$config->custom->commands['script'] = array('create' => true);
Return value
Type
Description
boolean
true if the feature is enabled and false otherwise.