掲示板

PermissionChecker issue

13年前 に Blaise Grand によって更新されました。

PermissionChecker issue

New Member 投稿: 4 参加年月日: 08/04/07 最新の投稿
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
13年前 に Peter Shin によって更新されました。

RE: PermissionChecker issue

Regular Member 投稿: 121 参加年月日: 07/09/24 最新の投稿
Hey Blaise, if you have access to the HttpServletRequest or PortletRequest obj, you can get the userId this way too.

PortalUtil.getUserId(request);