public function Server::checkDnExistsIncludeData in Lightweight Directory Access Protocol (LDAP) 8.3
Does dn exist for this server and what is its data?
Parameters
string $dn: DN to search for.
array $attributes: In same form as ldap_read $attributes parameter.
Return value
bool|array Return ldap entry or false.
3 calls to Server::checkDnExistsIncludeData()
- Server::groupAllMembers in ldap_servers/
src/ Entity/ Server.php - Get all members of a group.
- Server::groupMembers in ldap_servers/
src/ Entity/ Server.php - Get direct members of a group.
- Server::userUserToExistingLdapEntry in ldap_servers/
src/ Entity/ Server.php - Undocumented.
File
- ldap_servers/
src/ Entity/ Server.php, line 353
Class
- Server
- Defines the Server entity.
Namespace
Drupal\ldap_servers\EntityCode
public function checkDnExistsIncludeData($dn, array $attributes) {
$params = [
'base_dn' => $dn,
'attributes' => $attributes,
'attrsonly' => FALSE,
'filter' => '(objectclass=*)',
'sizelimit' => 0,
'timelimit' => 0,
'deref' => NULL,
];
$result = $this
->ldapQuery(Server::SCOPE_BASE, $params);
if ($result !== FALSE) {
$entries = @ldap_get_entries($this->connection, $result);
if ($entries !== FALSE && $entries['count'] > 0) {
return $entries[0];
}
}
return FALSE;
}