Fórum
PermissionChecker issue
Blaise Grand, modificado 13 Anos atrás.
PermissionChecker issue
New Member Postagens: 4 Data de Entrada: 07/04/08 Postagens Recentes
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)
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)
Peter Shin, modificado 13 Anos atrás.
RE: PermissionChecker issue
Regular Member Postagens: 121 Data de Entrada: 24/09/07 Postagens Recentes
Hey Blaise, if you have access to the HttpServletRequest or PortletRequest obj, you can get the userId this way too.
PortalUtil.getUserId(request);