From 22d490486a97d51ae4702fade8c8f6ab865172ba Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Mon, 8 Mar 2010 14:04:56 +0900 Subject: now using "%u" pattern as default for ldap_uids (EJAB-1203) --- src/eldap/eldap_utils.erl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/eldap/eldap_utils.erl b/src/eldap/eldap_utils.erl index 06dc9b00f..993219eb3 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( -- cgit v1.2.3