Foren
Fetching organization users on custom portlet
George Rempousis, geändert vor 11 Jahren.
Fetching organization users on custom portlet
New Member Beiträge: 7 Beitrittsdatum: 28.01.13 Neueste Beiträge
Hi I'm trying to implement a custom portlet and in the proccess I need to get the id's of the users that belongs to an organization.
I use the :
method to achieve that.
when I'm logged in, it is working perfectly
but as guest user (unregistered) I get :
Is there any way that I resolve this issue?
Thanks
I use the :
List<User> organizationUsers = UserServiceUtil.getOrganizationUsers(orgID);
method to achieve that.
when I'm logged in, it is working perfectly
but as guest user (unregistered) I get :
com.liferay.portal.security.auth.PrincipalException exception.
Is there any way that I resolve this issue?
Thanks
Oliver Bayer, geändert vor 11 Jahren.
RE: Fetching organization users on custom portlet (Antwort)
Liferay Master Beiträge: 894 Beitrittsdatum: 18.02.09 Neueste Beiträge
Hi George,
if the current user is not authenticated which you can check by using "themeDisplay.isSignedIn()" you can show sth. else e.g. a warning message that you have to be logged in before using your portlet. Another solution would be to use UserLocalServiceUtil as the ...Local... classes don't have security/ permission checks.
HTH Oli
if the current user is not authenticated which you can check by using "themeDisplay.isSignedIn()" you can show sth. else e.g. a warning message that you have to be logged in before using your portlet. Another solution would be to use UserLocalServiceUtil as the ...Local... classes don't have security/ permission checks.
HTH Oli
George Rempousis, geändert vor 11 Jahren.
RE: Fetching organization users on custom portlet
New Member Beiträge: 7 Beitrittsdatum: 28.01.13 Neueste Beiträge
Thanks Oliver,
worked perfectly
Much appreciated!
worked perfectly
Much appreciated!