Show logged in users name in DotNetNuke
The DotNetNuke documentation does not always have everything you need to customize the system. Often times you need to open up DotNetNuke in Visual Studio to review some of the methods that are available to you in the skins / ascx controls.
Here is how to show the first name, last name or show the username of the logged in user in DotNetNuke / DNN.
<%If HttpContext.Current.User.Identity.IsAuthenticated=True Then%>
Welcome
<%=UserController.GetCurrentUserInfo().FirstName%>
,
<%End If%>
<% If HttpContext.Current.User.Identity.IsAuthenticated=False Then %>
| Sign Up
<% End If %>
<% If HttpContext.Current.User.Identity.IsAuthenticated=True Then %>
|
<% End If %>
To show the username of the logged in user in DotNetNuke you can use UserController.GetCurrentUserInfo().UserName
Put this to work
Questions about applying this to your business? A 30-minute discovery call is the fastest way to find out.
Reach Out →or call 517-455-7837