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 155 posts 380 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 89 posts 329 karma points
    Dec 26, 2019 @ 06:52
    AddWeb Solution Pvt. Ltd
    0

    Hello,

    Have you created your own login controller ?

  • John Bergman 460 posts 1066 karma points
    Dec 26, 2019 @ 07:00
    John Bergman
    0

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

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

    Backoffice User's

  • Enkosi 8 posts 80 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.

  • 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