Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Ldap] Allow multiple values onextra_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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Ldap] Allow multiple values onextra_fields#49187
Uh oh!
There was an error while loading.Please reload this page.
Conversation
765d893 toe51b502CompareOskarStark commentedFeb 1, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
One could argue, that this is a new feature, but I am for handling this as a bugfix and merge it in |
nicolas-grekas commentedFeb 1, 2023
Thank you@mvhirsch. |
DemigodCode commentedApr 11, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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". |
OskarStark commentedApr 11, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.-Fixessymfony/symfony#49994- refssymfony/symfony#49187Commits-------f75e437 adds hint of return value
Loading users with the
LdapUserProvider, usingextra_fieldsfails if I want to getmemberOfattribute.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 fromgetPassworddbf45e4, forcing the password attribute to be unique. Same goes foruidKeyc91689b. Loadingextra_fieldsshould 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 anInvalidArgumentExceptionwas thrown.