user list null

thumbnail
Ramalingaiah. D, modified 6 Years ago. Expert Posts: 489 Join Date: 8/16/14 Recent Posts
Hi,

Group group = themeDisplay.getScopeGroup();
        Group currentGroup =  themeDisplay.getLayout().getGroup();
        long organizationId = currentGroup.getClassPK();
        
     List<com.liferay.portal.kernel.model.user> userInfoList=UserLocalServiceUtil.getOrganizationUsers(organizationId);
        
      &nbsp;System.out.println("userInfoList:"+userInfoList);&nbsp;</com.liferay.portal.kernel.model.user>



console error 

userInfoList:[]

thank you 
​​​​​​​Ram
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
This should work in principle.
Print out the organizationId and compare it to the correct organizationId. I guess it is different.
Could you please check the ids?

If that doesn't lead to something, please also post the Liferay version.


- Your code assumes that you have created a site out of your organisation (there's a checkbox for that).
- You excute that code on a page of that site

Maybe you are not on an organisation page?