Commit dff1f5bd authored by Matt Tucker's avatar Matt Tucker Committed by matt

Fixed loading LDAP users by index.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@752 b35dd754-fafc-0310-a699-88a17e54d16e
parent b8e66ea6
......@@ -141,8 +141,8 @@ public class LdapUserProvider implements UserProvider {
// Search for the dn based on the username.
SearchControls constraints = new SearchControls();
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
constraints.setReturningAttributes(new String[] { "jiveUserID" });
String filter = "(jiveUserID=*)";
constraints.setReturningAttributes(new String[] { manager.getUsernameField() });
String filter = "(" + manager.getUsernameField() + "=*)";
NamingEnumeration answer = ctx.search("", filter, constraints);
for (int i = 0; i < startIndex; i++) {
answer.next();
......@@ -153,7 +153,7 @@ public class LdapUserProvider implements UserProvider {
// Get the next userID.
usernames.add(
(String)((SearchResult)answer.next()).getAttributes().get(
"jiveUserID").get()
manager.getUsernameField()).get()
);
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment