24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-09-21 14:06:57 +02:00

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

View File

@ -143,7 +143,7 @@ search_items(Entries, State) ->
#eldap_entry{attributes = Attrs} = E, Attrs #eldap_entry{attributes = Attrs} = E, Attrs
end, end,
Entries), Entries),
lists:flatmap( lists:filtermap(
fun(Attrs) -> fun(Attrs) ->
case eldap_utils:find_ldap_attrs(UIDs, Attrs) of case eldap_utils:find_ldap_attrs(UIDs, Attrs) of
{U, UIDAttrFormat} -> {U, UIDAttrFormat} ->
@ -163,15 +163,15 @@ search_items(Entries, State) ->
end, end,
SearchReported), SearchReported),
J = <<Username/binary, $@, LServer/binary>>, J = <<Username/binary, $@, LServer/binary>>,
[{<<"jid">>, J} | RFields]; {true, [{<<"jid">>, J} | RFields]};
_ -> _ ->
[] false
end; end;
_ -> _ ->
[] false
end; end;
<<"">> -> <<"">> ->
[] false
end end
end, Attributes). end, Attributes).