Return User Profile Picture relative Url. UserId, width and height can be passed to build a formatted relative Avatar Url.
Namespace: DotNetNuke.CommonAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
[ObsoleteAttribute("Deprecated in Platform 8.0.0. Please use UserController.Instance.GetUserProfilePictureUrl")] public static string UserProfilePicRelativeUrl() |
Visual Basic |
---|
<ObsoleteAttribute("Deprecated in Platform 8.0.0. Please use UserController.Instance.GetUserProfilePictureUrl")> Public Shared Function UserProfilePicRelativeUrl As String |
Return Value
Formatted url, e.g. /DnnImageHandler.ashx?userid={0}&h={1}&w={2} considering child portal
Remarks
Usage: ascx - <asp:Image ID="avatar" runat="server" CssClass="SkinObject" />
code behind - avatar.ImageUrl = string.Format(Globals.UserProfilePicRelativeUrl(), userInfo.UserID, 32, 32)