diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2012-04-17 11:19:53 +0400 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2012-04-17 11:19:53 +0400 |
commit | e616d2686f7be6f409d5869ff574f5bd2819b213 (patch) | |
tree | a740cbf5dc662798e0a4636044ca626dcfef4cdc /src | |
parent | 5a09d671ab2079294dbeb54d55eb9e1ae36cb5fd (diff) |
Perform user part substitution in ldap_rfilter (EJAB-1555)
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_shared_roster_ldap.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mod_shared_roster_ldap.erl b/src/mod_shared_roster_ldap.erl index 229be7fd8..894b90076 100644 --- a/src/mod_shared_roster_ldap.erl +++ b/src/mod_shared_roster_ldap.erl @@ -329,10 +329,13 @@ eldap_search(State, FilterParseArgs, AttributesList) -> [] end. -get_user_displayed_groups({_User, Host}) -> +get_user_displayed_groups({User, Host}) -> {ok, State} = eldap_utils:get_state(Host, ?MODULE), GroupAttr = State#state.group_attr, - Entries = eldap_search(State, [State#state.rfilter], [GroupAttr]), + Entries = eldap_search( + State, + [eldap_filter:do_sub(State#state.rfilter, [{"%u", User}])], + [GroupAttr]), Reply = lists:flatmap( fun(#eldap_entry{attributes = Attrs}) -> case Attrs of |