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
user list null
Hi,
console error
userInfoList:[]
thank you
Ram
Group group = themeDisplay.getScopeGroup();
Group currentGroup = themeDisplay.getLayout().getGroup();
long organizationId = currentGroup.getClassPK();
List<com.liferay.portal.kernel.model.user> userInfoList=UserLocalServiceUtil.getOrganizationUsers(organizationId);
System.out.println("userInfoList:"+userInfoList); </com.liferay.portal.kernel.model.user>console error
userInfoList:[]
thank you
Ram
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?
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?