Copied to clipboard

Flag this post as spam?

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


  • Kurniawan Kurniawan 202 posts 225 karma points
    Dec 01, 2010 @ 09:35
    Kurniawan Kurniawan
    0

    Get Umbraco Login User ID

    Hi All,

     

    Anyone knows how to get User currently Login ID in umbraco ?
    Because I am building custom CMS and need to detect the curren User login ID.

    Any API reference ?

     

    Thanks

  • Michael Latouche 504 posts 819 karma points MVP 5x c-trib
    Dec 01, 2010 @ 09:46
    Michael Latouche
    0

    Hi Kurniawan,

    I think the most generic way of doing this is using the Membership provider classes: Membership.GetUser().ProviderUserKey. This returns an object that you can cast to an int to get the currently logged in member ID in Umbraco.

    Cheers,

    Michael.

  • Rich Green 2246 posts 4008 karma points
    Dec 01, 2010 @ 10:09
    Rich Green
    0

    Hi,

    This should do it

    umbraco.helper.GetCurrentUmbracoUser().Id

    Rich

  • 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