Forums de discussion

Portrait Url without Theme Display

thumbnail
Asad Saeed Awan, modifié il y a 7 années.

Portrait Url without Theme Display

Regular Member Publications: 126 Date d'inscription: 16/01/15 Publications récentes
Hello,

How do I get portrait URL without theme display?
thumbnail
Andrew Jardine, modifié il y a 7 années.

RE: Portrait Url without Theme Display

Liferay Legend Publications: 2416 Date d'inscription: 22/12/10 Publications récentes
Hi Asad,

I am curious -- where are you trying to access the portrait URL from that you don't have a theme display?

Apart from my question, the method that uses the theme display only seems to require the image path. Perhaps you can calculate it separately. My search of the source revealed it as calculated like so --

	setPathThemeImages(
			cdnBaseURL + themeStaticResourcePath + theme.getImagesPath());


Once you have it, and the user details of course, then you can just use the logic from that method (that uses the ThemeDisplay parameter). The UserConstants class is in the portal-service.jar so it is available across the server.

return UserConstants.getPortraitURL(
			themeDisplay.getPathImage(), isMale(), getPortraitId(),
			getUserUuid());


Let me know if that helps -- and where you are trying to access the portrait URL from.
thumbnail
Fil Giu, modifié il y a 7 années.

RE: Portrait Url without Theme Display

Junior Member Publications: 48 Date d'inscription: 20/11/13 Publications récentes
I have the same problem.

I would access the user's avatar image by public API, in order to show the img in an other tools.
Is it possible ?