Commit 60f1847a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added missing setters/getters. JM-880

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5838 b35dd754-fafc-0310-a699-88a17e54d16e
parent 35563484
......@@ -416,6 +416,28 @@ public class LdapUserProvider implements UserProvider {
return Collections.unmodifiableSet(searchFields.keySet());
}
public void setSearchFields(String fieldList) {
this.searchFields = new LinkedHashMap<String,String>();
// If the value isn't present, default to to username, name, and email.
if (fieldList == null) {
searchFields.put("Username", manager.getUsernameField());
searchFields.put("Name", manager.getNameField());
searchFields.put("Email", manager.getEmailField());
}
else {
try {
for (StringTokenizer i=new StringTokenizer(fieldList, ","); i.hasMoreTokens(); ) {
String[] field = i.nextToken().split("/");
searchFields.put(field[0], field[1]);
}
}
catch (Exception e) {
Log.error("Error parsing LDAP search fields: " + fieldList, e);
}
}
JiveGlobals.setXMLProperty("ldap.searchFields", fieldList);
}
public Collection<User> findUsers(Set<String> fields, String query)
throws UnsupportedOperationException
{
......
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