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?
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
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!
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
Thats perfect!
Thanks Dirk!
is working on a reply...