Copied to clipboard

Flag this post as spam?

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


  • Soeren Sprogoe 575 posts 259 karma points
    May 01, 2010 @ 14:43
    Soeren Sprogoe
    0

    Is logged in into the backend?

    Is there a way (preferably via XSLT) to check if the user is logged into the backend of Umbraco?

    I want to display extra information on a site if it is an admin that is surfing around on it.

    If it is not possible via XSLT, how do I do this via C#?

    Best regards,
    SoerenS

  • Soeren Sprogoe 575 posts 259 karma points
    May 01, 2010 @ 16:12
    Soeren Sprogoe
    4

    To answer my own question:
    http://our.umbraco.org/forum/developers/extending-umbraco/2251-get-current-logged-in-user

    Made this into an xslt extension function with the following code:

    public static bool IsLoggedIntoBackend()
    {
    var u = umbraco.helper.GetCurrentUmbracoUser();
    if (u == null)
    return false;
    else
    return true;
    }

    /SoerenS

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies