summaryrefslogtreecommitdiff
path: root/src/mod_vcard_ldap.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-03-25 10:53:46 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-03-25 10:53:46 +0300
commitea9c3fd8f75e65f99b2b89763138647e1aea6fc0 (patch)
tree0fc931612c7eed9a432e4fea2f6e761dd7fb7623 /src/mod_vcard_ldap.erl
parentGet rid of 'fs' package dependency in mix (diff)
Fix returning value from mod_vcard_ldap's search() callback
Fixes #2335
Diffstat (limited to 'src/mod_vcard_ldap.erl')
-rw-r--r--src/mod_vcard_ldap.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mod_vcard_ldap.erl b/src/mod_vcard_ldap.erl
index ce4fcd70..51de22e4 100644
--- a/src/mod_vcard_ldap.erl
+++ b/src/mod_vcard_ldap.erl
@@ -143,7 +143,7 @@ search_items(Entries, State) ->
#eldap_entry{attributes = Attrs} = E, Attrs
end,
Entries),
- lists:flatmap(
+ lists:filtermap(
fun(Attrs) ->
case eldap_utils:find_ldap_attrs(UIDs, Attrs) of
{U, UIDAttrFormat} ->
@@ -163,15 +163,15 @@ search_items(Entries, State) ->
end,
SearchReported),
J = <<Username/binary, $@, LServer/binary>>,
- [{<<"jid">>, J} | RFields];
+ {true, [{<<"jid">>, J} | RFields]};
_ ->
- []
+ false
end;
_ ->
- []
+ false
end;
<<"">> ->
- []
+ false
end
end, Attributes).