Page MenuHomePhabricator

Allow access to multi-value fields
Closed, ResolvedPublicFeature

Description

From https://www.mediawiki.org/wiki/Topic:Ww8zaeolpsfsto5f

In our ldap we allow users to have more than one "mailbox" or aliases or mail attribute values. When they do this property is returned as an array versus a string when there is only one value. So I get "array" returned instead of the mail[0] value...

How can I change:

"email" => "mail"
To be a valid setting which will return either the normal single value or the first array element, Something like:

"email" => "mail[0]" || "mail"
If "mail[0]" returns, use that, if not then use "mail"

This is in our $LDAPProviderDomainConfigProvider as $config = [ "LDAP" => [ "usserinfo" => [ "attributes-map" => [ "email" => "mail" ] ] ] ]

Thanks for any ideas on a solution.

Event Timeline

Osnard triaged this task as Medium priority.
Osnard lowered the priority of this task from Medium to Low.
Aklapper renamed this task from Allow access to mulit-value fields to Allow access to multi-value fields.May 30 2022, 9:34 AM