Hello Guys
ScreenName is nik name or unique identification of the user and we need to use screenname for user tagging and identify the user in liferay.
There are two ways to get screenname of current user :
Step 1: Get screenname of current user in jsp(view.jsp) page in liferay portlet.
User user = themeDisplay.getUser();
String screenname = user.getScreenName();
Step 2: Get screenname of current user in Prtlet class(Controller) in liferay portlet.
User user = PortalUtil.getUser(request)
String screenname = user.getScreenName();
0 Comment(s)