Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
enrico zanchetta
AddUser search result by scopedGroupId
2 maggio 2012 13.44
Risposta

enrico zanchetta

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 29 marzo 2012

Messaggi recenti

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?
Shagul Khajamohideen
RE: AddUser search result by scopedGroupId
2 maggio 2012 14.42
Risposta

Shagul Khajamohideen

Punteggio: Liferay Master

Messaggi: 759

Data di Iscrizione: 27 settembre 2007

Messaggi recenti

Try something like below. You could also look into the code behind current community members listing.

1
2LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();
3params.put("usersGroups", new Long(groupId));
4UserLocalServiceUtil.search(companyId, keywords, 0, params, start, end, null);
enrico zanchetta
RE: AddUser search result by scopedGroupId
2 maggio 2012 14.51
Risposta

enrico zanchetta

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 29 marzo 2012

Messaggi recenti

Thank you for quickly response emoticon
I saw that working on site membership but not working on Users and Organizations. I created a hook the code:
1
2@Override
3 public Hits search(long companyId, String keywords, int status,
4   LinkedHashMap<String, Object> params, int start, int end, Sort sort)
5   throws SystemException {
6  logger.info("User (A) Search");
7 
8  params.put("usersGroups", ServiceContextThreadLocal.getServiceContext().getScopeGroupId());
enrico zanchetta
RE: AddUser search result by scopedGroupId
3 maggio 2012 2.23
Risposta

enrico zanchetta

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 29 marzo 2012

Messaggi recenti

:-( I have the same problem again :-( I didn t find a solution for Users and Organizations
Any Idea?