Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Blaise Grand
PermissionChecker issue
14 de octubre de 2010 0:08
Respuesta

Blaise Grand

Ranking: New Member

Mensajes: 3

Fecha de incorporación: 7 de abril de 2008

Mensajes recientes

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)
Peter Shin
RE: PermissionChecker issue
14 de octubre de 2010 13:19
Respuesta

Peter Shin

LIFERAY STAFF

Ranking: Regular Member

Mensajes: 120

Fecha de incorporación: 24 de septiembre de 2007

Mensajes recientes

Hey Blaise, if you have access to the HttpServletRequest or PortletRequest obj, you can get the userId this way too.

1PortalUtil.getUserId(request);