Sure, we could launch space ships
But we’d rather launch mobile apps
Blog
Show logged in users name in DotNetNuke

DotNetNuke – Show the logged in users name

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

Posted in: DotNetNuke
Actions: E-mail | Comments (5)

Comments

Wednesday, May 19, 2010 10:15 AM
Nice tutorials...I would be following your blog from now on
Wednesday, May 19, 2010 10:16 AM

Welcome
<%=UserController.GetCurrentUserInfo().FirstName%>

,
<%End If%>

facebook Smileys

Roshan
Monday, October 04, 2010 7:01 AM
Thanks dear,
This works nice..
UserController.GetCurrentUserInfo().FirstName.ToString();
UserController.GetCurrentUserInfo().LastName.ToString();
Roshan.
Tuesday, January 03, 2012 2:56 PM
Hey great job, thanks for the tip, just used it. I couldn't figure out how to check to see if the user was logged in without doing a query or use a control.

Cheers
Sunday, February 05, 2012 10:27 PM
Hey great job, thanks for sharing.

Post Comment

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above:

     The blog is one way to stay current on all things Web Ascender. On this page you'll find articles with tutorials, advice, industry news, and other general Web Ascender announcements.  Checking this page regularly (or subscribing to our RSS feed) will help you get the most out of SiteCTO, Enlighten, and our other web marketing and tracking services.

    Michigan Website Design and Development | Link to Web Ascender  |  Related Content
    Michigan Web Design Blog