Forums de discussion
get user picture
safa safa, modifié il y a 7 années.
get user picture
New Member Publications: 6 Date d'inscription: 06/10/16 Publications récentes
hello . i want to get user connected picture
i use template vm. i search a lot i find this code but it dosen't work with me
$httpUtil.encodeURL($DigesterUtil.digest($user.getPortraitId()) he couldn't recognize this code
could anyone can help me please.thanks
i use template vm. i search a lot i find this code but it dosen't work with me
#set ($profilePicUrl = $request.theme-display.path-image + "/user_")
#if ($user.isFemale())
#set ($profilePicUrl = $profilePicUrl + "female")
#else
#set ($profilePicUrl = $profilePicUrl + "male")
#end
#set ($profilePicUrl = $profilePicUrl + "_portrait?img_id=")
#set ($profilePicUrl = $profilePicUrl + $user.getPortraitId())
portarait:$user.getPortraitId()
#set ($profilePicUrl = $profilePicUrl + "&img_id_token=")
#set ($DigesterUtil = $portal.getClass().forName("com.liferay.portal.kernel.util.DigesterUtil"))
#set ($profilePicUrl = $profilePicUrl +$httpUtil.encodeURL($DigesterUtil.digest($user.getPortraitId())))
<img src="$profilePicUrl">
$httpUtil.encodeURL($DigesterUtil.digest($user.getPortraitId()) he couldn't recognize this code
could anyone can help me please.thanks
safa safa, modifié il y a 7 années.
RE: get user picture
New Member Publications: 6 Date d'inscription: 06/10/16 Publications récentes
liferay version 6.2 CE
Amos Fong, modifié il y a 7 années.
RE: get user picture
Liferay Legend Publications: 2047 Date d'inscription: 07/10/08 Publications récentes
Hm...maybe try using $utilLocator to find digesterUtil