Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • steweir 34 posts 54 karma points
    Jul 12, 2011 @ 16:04
    steweir
    0

    Display username in dashboard

    Is there a way to display the name of the user logged in on the dashboard

    e.g.  Hello Admin

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jul 12, 2011 @ 16:20
    Tom Fulton
    0

    Hi,

    Not by default, but it would be very simple to make a custom dashboard control that did this.

    Basically you would just make a normal usercontrol, and add it to /config/Dashboard.config to make it show up.

    In your usercontrol you can use something like this to get the user's name:  umbraco.BusinessLogic.User.GetCurrent().Name;

    -Tom

  • Rich Green 2246 posts 4008 karma points
    Jul 12, 2011 @ 16:24
    Rich Green
    1

    Hey,

    Yes, you need to create a usercontol and use this code. You need to add a reference to businesslogic (which you can grab from the websites bin directory)

    Hello <%=umbraco.BusinessLogic.User.GetCurrent().Name%>

    You might also be able to do this in Razor?

    You'll then need to add this user control / tab to your /config/Dashboard.config file.

    Rich

  • Rich Green 2246 posts 4008 karma points
    Jul 12, 2011 @ 16:25
    Rich Green
    0

    Cross post :)

  • steweir 34 posts 54 karma points
    Jul 12, 2011 @ 18:57
    steweir
    0

    Thanks, got it working now :)

Please Sign in or register to post replies

Write your reply to:

Draft