node-ldapjs icon indicating copy to clipboard operation
node-ldapjs copied to clipboard

Returning multivalued attributes (such as member)?

Open tstiemerling opened this issue 11 years ago • 2 comments

Noticed that when I query a group for the member attribute, the member attribute is returned as a string if there is only one member, and as an array if there is more than one member - meaning I have to handle this in my code. Wondering if this a common expected pattern? I am guessing that ldapjs doesnt know apriori whether it will get a single value or multiple values back.

tstiemerling avatar Oct 08 '14 15:10 tstiemerling

Yes, that's is the expected behavior. It is inconvenient at times, but changing the API would likely incur heavy breakage for a large number of users.

pfmooney avatar Oct 08 '14 16:10 pfmooney

Looking over the code again, there might be a pretty easy way to expose what you're looking for. I'll work on it later this evening.

pfmooney avatar Oct 08 '14 16:10 pfmooney

👋

On February 22, 2023, we released version 3 of this library. As a result, we are closing this issue/pull request.

Please see issue #839 for more information, including how to proceed if you feel this closure is in error.

jsumners avatar Feb 22 '23 19:02 jsumners