Foren

PermissionChecker issue

Blaise Grand, geändert vor 13 Jahren.

PermissionChecker issue

New Member Beiträge: 4 Beitrittsdatum: 07.04.08 Neueste Beiträge
Hi!

In an application deployed as a Liferay portlet, we use the ID of the user to get data. It seems that the following code line don't return always the good information.

PermissionThreadLocal.getPermissionChecker().getUserId()

I cannot confirm it, but I think it returns sometimes the ID of the last user logged in the portal! Has someone a similar issue with Liferay?

Liferay Portal Standard Edition 5.2.2 (Augustine / Build 5202 / February 20, 2009)
thumbnail
Peter Shin, geändert vor 13 Jahren.

RE: PermissionChecker issue

Regular Member Beiträge: 121 Beitrittsdatum: 24.09.07 Neueste Beiträge
Hey Blaise, if you have access to the HttpServletRequest or PortletRequest obj, you can get the userId this way too.

PortalUtil.getUserId(request);