Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Help with search method of UserLocalServiceUtil
Hi,
I am trying to make a custom portlet which search users in function of expando values and first name.
I am trying with this
Hits hits = UserLocalServiceUtil.search(themeDisplay.getCompanyId(),
firstname,
null,
lastname,
"",
"",
WorkflowConstants.STATUS_APPROVED, // active or approved
params,
true, // andSearch
0,
UserLocalServiceUtil.getUsersCount(),
SortFactoryUtil.getSort(User.class, "orderByCol", "orderByType"));
where params are something like this:
{userExpandoAttributes=true, searchExpando=[[userArea, 22]]}
and userArea is a custom field. But this doesn´t work.
Anyone can help me? Any help would be appreciated
Regards,
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™