AnsweredAssumed Answered

Does UserFilter work with queryUsers?

Question asked by dongq on Mar 31, 2007
Latest reply on Oct 16, 2007 by dongq
Hi, I am trying to apply a filter to queryUsers, but it didn't work. I still get all the users in the repository.

Here is my code:
ArrayList<User> ulist = new ArrayList<User>();
AuthenticationUtils.startSession(admin, adminpwd);
AdministrationServiceSoapBindingStub administrationService = WebServiceFactory.getAdministrationService();
UserFilter filter = new UserFilter("test*");
UserQueryResults results = administrationService.queryUsers(filter);
while(true)
{
              for (UserDetails details : results.getUserDetails())
              {
                    String userName = details.getUserName();
                    User u = new User(userName);
                    ulist.add(u);
                }
               
              if (results.getQuerySession() == null)
                break;
               
              results = administrationService.fetchMoreUsers(results.getQuerySession());
}

Right now, I am just doing my own filtering. However, I want know if I am misusing the UserFilter or if it just doesn't work.

Thanks.

Qing

Outcomes