Topic on Extension talk:LDAPProvider

Can not ingest users mail attribute if it is an array of multiple addresses

4
D0li0 (talkcontribs)

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.

Osnard (talkcontribs)
Osnard (talkcontribs)
Osnard (talkcontribs)
Reply to "Can not ingest users mail attribute if it is an array of multiple addresses"