Foren

Profile picture of all the users in Liferay.

thumbnail
Praful Shukla, geändert vor 7 Jahren.

Profile picture of all the users in Liferay.

Junior Member Beiträge: 46 Beitrittsdatum: 29.09.15 Neueste Beiträge
Hello Everyone,

I have created a portlet for employee information. Now I need to show the profile picture of each of the employee along with comment functionality.
I have used the following code :
<img src="<%=themeDisplay.getUser().getPortraitURL(themeDisplay)%>" >
But it is not working.
Does anyone have any idea how this can be achieved..??
thumbnail
Milen Dyankov, geändert vor 7 Jahren.

RE: Profile picture of all the users in Liferay.

Expert Beiträge: 310 Beitrittsdatum: 30.10.12 Neueste Beiträge
themeDisplay.getUser()
will give you the current user. You need to try something like this (pseudocode)
foreach user in UserLocalServiceUtil.getUsers(...) {
 <img src="<%=user.getPortraitURL(themeDisplay)%>">
}