Monday, March 3, 2014

Fetching the User Details Based Upon User Page

From themeDisplay we will get the loggedIn User Details ,Suppose we want get the User Details based upon user page.
For example : Profile portlet (user A logged In and need to see the User B profile details in User B profile page)

//ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( WebKeys.THEME_DISPLAY );

Group group = themeDisplay.getScopeGroup(); 

if (group.isUser()) {  

 User user = UserLocalServiceUtil.getUser(group.getClassPK());

}

Liferay DXP JNDI Data Source Cofiguration

 This Blog will help us to learn about the JNDI Data Source Configuration in Liferay DXP. We have tested this with Liferay 7.3 with Tomcat. ...