From 9d2fd3e52cda7d388382c72878d16e8e3652f18f Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Mon, 8 Mar 2010 14:08:22 +0900 Subject: [PATCH] now using "%u" pattern as default for ldap_uids (EJAB-1203) --- src/eldap/eldap_utils.erl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/eldap/eldap_utils.erl b/src/eldap/eldap_utils.erl index e35be076a..b5a78cf0e 100644 --- a/src/eldap/eldap_utils.erl +++ b/src/eldap/eldap_utils.erl @@ -53,15 +53,17 @@ subfilter({UIDAttr}) -> %% Not tail-recursive, but it is not very terribly. %% It stops finding on the first not empty value. +find_ldap_attrs([{Attr} | Rest], Attributes) -> + find_ldap_attrs([{Attr, "%u"} | Rest], Attributes); find_ldap_attrs([{Attr, Format} | Rest], Attributes) -> - case get_ldap_attr(Attr, Attributes) of + case get_ldap_attr(Attr, Attributes) of Value when is_list(Value), Value /= "" -> - {Value, Format}; + {Value, Format}; _ -> - find_ldap_attrs(Rest, Attributes) - end; + find_ldap_attrs(Rest, Attributes) + end; find_ldap_attrs([], _) -> - "". + "". get_ldap_attr(LDAPAttr, Attributes) -> Res = lists:filter(