Fórumok

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

Nayrouz NZ, módosítva 11 év-val korábban

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

New Member Bejegyzések: 22 Csatlakozás dátuma: 2012.12.27. Legújabb bejegyzések
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, módosítva 11 év-val korábban

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

Junior Member Bejegyzések: 29 Csatlakozás dátuma: 2012.02.03. Legújabb bejegyzések
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();