Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
Peter Svehla
Custom field parameters ignored by
25 août 2014 23:58

Peter Svehla

Rang: New Member

Publications: 4

Date d'inscription: 18 mars 2012

Publications Récentes


I'm trying to retrieve a user record based on a custom field search (indexed):

1long companyId = 10154;
3String dn = "CN=Fred Smith,OU=Corporate,DC=company,DC=com";
4LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();
5params.put("distinguishedName", dn);
6Sort sort = new Sort("prefName", Sort.STRING_TYPE, true);
7Hits users =, null, WorkflowConstants.STATUS_ANY, params, QueryUtil.ALL_POS, QueryUtil.ALL_POS, sort);

The trouble is that the search returns all the users in the system, not just the user with the desired dn.

I get the same result on 6.1.20 and, so I'm thinking it's more likely that the problem is with my understanding of the API than a bug in Liferay.

Can anyone spot what I've done wrong?


Participate in the State of Liferay Community 2017. Help the community and even win some prizes!