Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey all,
I have to pages http://testdomain.com/test1 and http://testdomain.com/test2
test2 is protected so only members of testGroup has access.
I log in a user using:
//Get member from email Member m = Member.GetMemberFromLoginName("testUser"); //Log member in Member.AddMemberToCache(m);
Everything is fine, and user is logged in and can see test2 page
But when i log a user out using:
//Log member out Member.RemoveMemberFromCache(Member.CurrentMemberId()); Member.ClearMemberFromClient(Member.CurrentMemberId());
I can still get to test2 if i type http://testdomain.com/test2 directly in the addressbar.
Has anyone experienced this problem?
Thanks..
Hi,
Are you using umbracoV4? If so please use the normal asp.net Login Controls. Then you can use the Following Line to logout the user:
FormsAuthentication .SignOut();
FormsAuthentication
.SignOut();
Hope this helps you,
Richard
Thanks for your reply, I should have mentioned that I use umbraco v3.
The code I'm using to log in/out is taken from here http://umbraco.org/documentation/books/api-cheatsheet/working-with-members
What is the best way to implement membership in v3?
thanks...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problem with log out of member
Hey all,
I have to pages http://testdomain.com/test1 and http://testdomain.com/test2
test2 is protected so only members of testGroup has access.
I log in a user using:
Everything is fine, and user is logged in and can see test2 page
But when i log a user out using:
I can still get to test2 if i type http://testdomain.com/test2 directly in the addressbar.
Has anyone experienced this problem?
Thanks..
Hi,
Are you using umbracoV4? If so please use the normal asp.net Login Controls. Then you can use the Following Line to logout the user:
Hope this helps you,
Richard
Thanks for your reply, I should have mentioned that I use umbraco v3.
The code I'm using to log in/out is taken from here http://umbraco.org/documentation/books/api-cheatsheet/working-with-members
What is the best way to implement membership in v3?
thanks...
is working on a reply...