Fórum

How do I get current user info in the web form portlet?

Nayrouz NZ, modificado 11 Anos atrás.

How do I get current user info in the web form portlet?

New Member Postagens: 22 Data de Entrada: 27/12/12 Postagens Recentes
hi,
Liferay webform portlet doesnt send the "current User id" , I mean User who is logged.
I am trying to customize the web form portlet by coping the whole code into other new portlet. and I need the id or screen name or the email @ of the logged user to be filled automatically into the web-form.
I ll be grateful if you coud give me some help with this. thanks
thumbnail
Chirag Patadia, modificado 11 Anos atrás.

RE: How do I get current user info in the web form portlet?

Junior Member Postagens: 29 Data de Entrada: 03/02/12 Postagens Recentes
You can try with ThemeDisplay object which you can get it from request object. For your quick reference you can check with below code snippet.

ThemeDisplay td  =(ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY);
User user = td.getUser();