Using the DotNetNuke Profile Photo in a Custom Module
March 12th, 2011
private string GetUserPhotoUrl(UserInfo user)
{
if (user.Profile.Photo == null || user.Profile.Photo == "-1")
return user.Profile.PhotoURL;
else
return VirtualPathUtility.ToAbsolute("~/LinkClick.aspx") + "?fileticket=" + user.Profile.Photo;
}
An anonymous user or a user without a profile photo will always get the default ‘no_avatar.gif’ image.
