aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexey Shchepin <alexey@process-one.net>2003-11-27 20:16:10 +0000
committerAlexey Shchepin <alexey@process-one.net>2003-11-27 20:16:10 +0000
commitb154f7552389315c13e942c07d75ecd1a0afb6a0 (patch)
tree1d33452335c46a55b6627f8f7c80876dd95ce079 /src
parent* src/ejabberd_c2s.erl: Fixed processing of presence probe from (diff)
* examples/mtr/ejabberd.cfg: Updatted (thanks to Marshall T. Rose)
* src/ejabberd_auth.erl: LDAP attribute that holds user ID now configurable * src/ejabberd.cfg.example: Updated SVN Revision: 178
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd.cfg.example1
-rw-r--r--src/ejabberd_auth.erl3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ejabberd.cfg.example b/src/ejabberd.cfg.example
index baf46eae1..a4cd2c62b 100644
--- a/src/ejabberd.cfg.example
+++ b/src/ejabberd.cfg.example
@@ -69,6 +69,7 @@
% For LDAP uthentification use these lines instead of above one:
%{auth_method, ldap}.
%{ldap_servers, ["localhost"]}. % List of LDAP servers
+%{ldap_uidattr, "uid"}. % LDAP attribute that holds user ID
%{ldap_base, "dc=example,dc=com"}. % Base of LDAP directory
diff --git a/src/ejabberd_auth.erl b/src/ejabberd_auth.erl
index be7da007b..48c4edf8b 100644
--- a/src/ejabberd_auth.erl
+++ b/src/ejabberd_auth.erl
@@ -343,7 +343,8 @@ is_user_exists_ldap(User) ->
end.
find_user_dn(User) ->
- Filter = eldap:equalityMatch("uid", User),
+ Attr = ejabberd_config:get_local_option(ldap_uidattr),
+ Filter = eldap:equalityMatch(Attr, User),
Base = ejabberd_config:get_local_option(ldap_base),
case eldap:search("ejabberd", [{base, Base},
{filter, Filter},