Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 954 karma points
    Mar 15, 2011 @ 02:44
    Tom
    0

    umbraco Member vs System.Web.Security.Membership

    Hi Guys,

    I'm trying to work out how to reconcile this.. I have a situation where i need access to the ProviderUserKey Access.HasAccces(d.Id, member.ProviderUserKey)   but then i need to refer to the umbraco member's id..

     

    I was just wondering what the logic was behind having a member class in the umbraco business logic that didn't expose the core membership info when the members and roles are using the out of the box asp.net user fucntionality..

     

    is there a way to achieve what i need to do without doing something like assigning one variable for each type i.e.

    var member = System.Web.Security.Membership.GetUser();
    var umbracoMember = Member.GetCurrentMember();
    var viewedContentNodes = dc.ContentViewLogs.Where(cv => cv.MemberFK == umbracoMember.Id && cv.ViewedDate.HasValue).Select(cv => cv.ContentFK);
    foreach (var childDoc in items.Where(d => !viewedContentNodes.Contains(d.Id) && (!Access.IsProtected(d.Id, d.Path) || Access.HasAccces(d.Id, member.ProviderUserKey))))
  • adarsh 46 posts 66 karma points
    Mar 15, 2011 @ 15:51
    adarsh
    0

    hi tomm,

    do you got any solution for the query above.

  • Tom 713 posts 954 karma points
    Mar 15, 2011 @ 23:10
    Tom
    0

    Nope.. I just used both... it feels very dirty... surely there has to be a better way!

Please Sign in or register to post replies

Write your reply to:

Draft