mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
* src/mod_vcard_ldap.erl: Bugfix (thanks to Mickael Remond)
SVN Revision: 329
This commit is contained in:
parent
8e9628b9ed
commit
4f9497d358
@ -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
|
||||
|
@ -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,15 +489,17 @@ 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),
|
||||
case eldap:search("mod_vcard_ldap",[{base,Base},
|
||||
case eldap:search("mod_vcard_ldap",[{base, Base},
|
||||
{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.
|
||||
|
Loading…
Reference in New Issue
Block a user