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 158 posts 387 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 360 karma points
    Dec 26, 2019 @ 06:52
    AddWeb Solution Pvt. Ltd
    0

    Hello,

    Have you created your own login controller ?

  • John Bergman 483 posts 1132 karma points
    Dec 26, 2019 @ 07:00
    John Bergman
    0

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

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

    Backoffice User's

  • Enkosi 11 posts 86 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.

  • Megha 10 posts 80 karma points notactivated
    Feb 23, 2023 @ 06:39
    Megha
    0

    How can i get Front facing members id

Please Sign in or register to post replies

Write your reply to:

Draft