Foren
AddUser search result by scopedGroupId
enrico zanchetta, geändert vor 11 Jahren.
AddUser search result by scopedGroupId
New Member Beiträge: 5 Beitrittsdatum: 29.03.12 Neueste Beiträge
How can I change the search result on the function add users by filtering for the scope (into Users and Organizations)?
I want to manage multiple sites and each one can add an admin user. When I add new users, I see all portal users.But i want to see only user associated to site owner (the result for scopedGroupId)
I tried with hook on UserLocalServiceWrapper with search override but missed the scopedGroupId
Any Idea?
I want to manage multiple sites and each one can add an admin user. When I add new users, I see all portal users.But i want to see only user associated to site owner (the result for scopedGroupId)
I tried with hook on UserLocalServiceWrapper with search override but missed the scopedGroupId
Any Idea?
Shagul Khajamohideen, geändert vor 11 Jahren.
RE: AddUser search result by scopedGroupId
Liferay Master Beiträge: 758 Beitrittsdatum: 27.09.07 Neueste Beiträge
Try something like below. You could also look into the code behind current community members listing.
LinkedHashMap<string, object> params = new LinkedHashMap<string, object>();
params.put("usersGroups", new Long(groupId));
UserLocalServiceUtil.search(companyId, keywords, 0, params, start, end, null);
</string,></string,>
enrico zanchetta, geändert vor 11 Jahren.
RE: AddUser search result by scopedGroupId
New Member Beiträge: 5 Beitrittsdatum: 29.03.12 Neueste Beiträge
Thank you for quickly response
I saw that working on site membership but not working on Users and Organizations. I created a hook the code:
I saw that working on site membership but not working on Users and Organizations. I created a hook the code:
@Override
public Hits search(long companyId, String keywords, int status,
LinkedHashMap<string, object> params, int start, int end, Sort sort)
throws SystemException {
logger.info("User (A) Search");
params.put("usersGroups", ServiceContextThreadLocal.getServiceContext().getScopeGroupId());
</string,>
enrico zanchetta, geändert vor 11 Jahren.
RE: AddUser search result by scopedGroupId
New Member Beiträge: 5 Beitrittsdatum: 29.03.12 Neueste Beiträge
:-( I have the same problem again :-( I didn t find a solution for Users and Organizations
Any Idea?
Any Idea?