Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the current user in Liferay?

Tags:

java

liferay-6

How can I get the current user connected to a Liferay portal with a simple Java code?

I'm using Liferay 6.0.6

like image 964
med Avatar asked May 09 '12 20:05

med


People also ask

What is user in Liferay?

In case there's any confusion over the term, a User in Liferay is an entity that can sign into the portal and do something. Generally a User has more privileges, called Permissions, than a Guest of your site, who does not sign in.

What is the screen name in Liferay?

Screen Name in Liferay is very important which is unique in the Portal. While creating user the Screen Name is mandatory field and Screen Name represents the actual user in the portal. Sometimes its necessary to validate the screen name entered by the user at the time of creation of users.


Video Answer


1 Answers

Simply:

User currentUser = PortalUtil.getUser(request);
like image 132
Mark Avatar answered Oct 12 '22 18:10

Mark