Be careful that the correct method is getPortraitURL(ThemeDisplay themeDisplay)
, URL is in uppercase.
Try this:
$user.getPortraitURL($themeDisplay)
You should also be able to use $themeDisplay
.
Access Objects from Velocity is useful link for all liferay velocity variables.