Skip to content

Commit 0185251

Browse files
committed
minor #14800 [Ldap] Add examples about get/has attribute (javiereguiluz)
This PR was merged into the 4.4 branch. Discussion ---------- [Ldap] Add examples about get/has attribute I want to document #14625 but first we need to add some examples of the methods that changed their behavior. Commits ------- ff28617 [Ldap] Add examples about get/has attribute
2 parents 2ff4cfd + ff28617 commit 0185251

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)