Skip to content

Commit ff28617

Browse files
committed
[Ldap] Add examples about get/has attribute
1 parent 2ff4cfd commit ff28617

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/ldap.rst

+4
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ delete existing ones::
139139
$query = $ldap->query('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))');
140140
$result = $query->execute();
141141
$entry = $result[0];
142+
143+
$phoneNumber = $entry->getAttribute('phoneNumber');
144+
$isContractor = $entry->hasAttribute('contractorCompany');
145+
142146
$entry->setAttribute('email', ['[email protected]']);
143147
$entryManager->update($entry);
144148

0 commit comments

Comments
 (0)