Copied to clipboard

Flag this post as spam?

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


  • Edward Dudley 80 posts 121 karma points
    Oct 08, 2009 @ 11:07
    Edward Dudley
    0

    Umbraco Member API

    Hi,

    Now Umbraco V4 uses MembershipProviders do the umbraco API methods relating to members still work?

    I'm using AddMemberToCache(..) to log a memebr in and I call the method GetCurrentMember() and it retrieves the details of the current member absolutely fine.

    But when I then try to access a page restricted with public access I always get redirected to the log on page.

    I guessed this might be due to mixing MembershipProviders and the Umbraco API - if that is the case then what should I use to log a user in / out and still be able to use public access?

    Thanks!

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 08, 2009 @ 11:35
    Dirk De Grave
    0

    Edward, you could use the standard asp.net login controls which will call the membership api for you, nothing else should be done! Also, check whether a cookie gets created (name of cookie should be in web.config, it's yourAuthCookie by default) as this is what standard asp.net membership uses for access checks

    And it's indeed best practise to rely on the membership api calls rather than using the umbraco member api. A nice overview can be found on the wiki

    Hope this helps.

     

    Regards,

    /Dirk

     

  • Edward Dudley 80 posts 121 karma points
    Oct 08, 2009 @ 11:37
    Edward Dudley
    0

    Thats perfect!

    Thanks Dirk!

Please Sign in or register to post replies

Write your reply to:

Draft