Copied to clipboard

Flag this post as spam?

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


  • Mus'ab 157 posts 384 karma points notactivated
    Dec 25, 2019 @ 09:05
    Mus'ab
    0

    How to get current user and if has permeation to access the node ?

    Hi i want to return the current user with this code

    var currentUser = UmbracoContext.Security.CurrentUser;
    

    but its return null

    and how can i return if this user has the permeation to access a node with its id or path ?

  • AddWeb Solution Pvt. Ltd 109 posts 353 karma points
    Dec 26, 2019 @ 06:52
    AddWeb Solution Pvt. Ltd
    0

    Hello,

    Have you created your own login controller ?

  • John Bergman 478 posts 1107 karma points
    Dec 26, 2019 @ 07:00
    John Bergman
    0

    Are you asking about Backoffice User's or Front facing members?

  • Mus'ab 157 posts 384 karma points notactivated
    Jan 04, 2020 @ 10:02
    Mus'ab
    0

    Backoffice User's

  • Enkosi 9 posts 83 karma points
    Dec 17, 2020 @ 07:02
    Enkosi
    0

    For those that have also wandered here, to get the BackOffice User you can do the following:

    var wrapper = new HttpContextWrapper(HttpContext.Current);
    var currentUserObj = wrapper.GetCurrentIdentity(true);
    

    I hope it helps.

Please Sign in or register to post replies

Write your reply to:

Draft