25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

* src/mod_vcard_ldap.erl: Bugfix (thanks to Mickael Remond)

SVN Revision: 329
This commit is contained in:
Alexey Shchepin 2005-04-26 11:22:04 +00:00
parent 8e9628b9ed
commit 4f9497d358
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2005-04-26 Alexey Shchepin <alexey@sevcom.net>
* src/mod_vcard_ldap.erl: Bugfix (thanks to Mickael Remond)
2005-04-24 Alexey Shchepin <alexey@sevcom.net>
* src/web/ejabberd_web_admin.erl: Added translation to submit

View File

@ -401,7 +401,7 @@ search_result(Lang, JID, Data) ->
?LFIELD("Organization Unit", "orgunit")
]}] ++ lists:map(fun(E) ->
record_to_item(E#eldap_entry.attributes)
end, search(Data)).
end, search(JID#jid.lserver, Data)).
-define(FIELD(Var, Val),
{xmlelement, "field", [{"var", Var}],
@ -489,7 +489,7 @@ record_to_item(Attributes) ->
FList = [X || X <- List, X /= none],
{xmlelement, "item", [],FList}.
search(Data) ->
search(LServer, Data) ->
Filter = make_filter(Data),
Base = ejabberd_config:get_local_option(ldap_base),
UIDAttr = ejabberd_config:get_local_option(ldap_uidattr),
@ -497,7 +497,9 @@ search(Data) ->
{filter, Filter},
{attributes, []}]) of
#eldap_search_result{entries = E} ->
[X || X <- E, ejabberd_auth:is_user_exists(ldap_get_value(X,UIDAttr)) ];
[X || X <- E,
ejabberd_auth:is_user_exists(
ldap_get_value(X, UIDAttr), LServer)];
_ ->
?ERROR_MSG("~p", ["Bad search"])
end.