Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Nayrouz NZ
How do I get current user info in the web form portlet?
February 17, 2013 1:35 AM
Answer

Nayrouz NZ

Rank: New Member

Posts: 22

Join Date: December 27, 2012

Recent Posts

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
Chirag Patadia
RE: How do I get current user info in the web form portlet?
February 17, 2013 2:50 AM
Answer

Chirag Patadia

Rank: Junior Member

Posts: 29

Join Date: February 2, 2012

Recent Posts

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.

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