-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Ldap] Allow multiple values on extra_fields
#49187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Ldap] Allow multiple values on extra_fields
#49187
Conversation
765d893
to
e51b502
Compare
One could argue, that this is a new feature, but I am for handling this as a bugfix and merge it in |
Thank you @mvhirsch. |
This "fix" breaks BC in my case. Had to update all occurences. An upgrade notice would be very nice for that. That happens for all extraFields that are not "uidKey" or "passwordAttribute". |
I think a BC break as not planned here. Not sure how to fix this. |
…ds()` (mvhirsch) This PR was merged into the 5.4 branch. Discussion ---------- [Ldap] Adds return value hint of `LdapUser::getExtraFields()` Hi, I'm not sure if this is the correct approach to document that. Please advice me where to document this. I'd love to get this done correctly. - Fixes symfony/symfony#49994 - refs symfony/symfony#49187 Commits ------- f75e437 adds hint of return value
Loading users with the
LdapUserProvider
, usingextra_fields
fails if I want to getmemberOf
attribute.This happens, if my user has multiple attributes set. After taking a look at
Ldap\Entry
(which supports multiple values per attribute). Looking atLdapUserProvider::getAttributeValue()
it was very clear, that every attribute must be unique.The method
getAttributeValue()
has originated fromgetPassword
dbf45e4, forcing the password attribute to be unique. Same goes foruidKey
c91689b. Loadingextra_fields
should allow for multiple values per attribute (likememberOf
).Did I break backward compatibility? No, I didn't. Simply because it was never usable as array while loading users via
LdapUserProvider
, instead anInvalidArgumentException
was thrown.