Fix returning value from mod_vcard_ldap's search() callback

Fixes #2335
This commit is contained in:
Evgeniy Khramtsov 2018-03-25 10:53:46 +03:00
parent f3b3bffec0
commit ea9c3fd8f7
1 changed files with 5 additions and 5 deletions

View File

@ -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).