Problems clearing a member from the cache Options
chimnit
Posted: Tuesday, August 12, 2008 10:56:18 PM
Rank: Devotee

Joined: 10/25/2007
Posts: 59
Hi everybody

I am making a custom control for logging in (umbraco v 3.0.5), but I'm having problems removing the user from the cache. I use the following to log in the user:
Quote:

// Login the user with the username and password
Member member = Member.GetMemberFromLoginName(loginName);

if (member != null)
{
// Login the member for a designated number of minutes
if (useCookiesForAuthentication)
Member.AddMemberToCache(member);
else
Member.AddMemberToCache(member, true, new TimeSpan(0, 20, 0));

Response.Redirect(redirectUrl, true);
}


I use the following lines to log out the user:

Quote:
Member.RemoveMemberFromCache(Member.CurrentMemberId());
Member.ClearMemberFromClient(Member.CurrentMemberId());

Response.Redirect(redirectUrl);


Can anybody see what I'm doing wrong? The user is not getting logged out.

I have used similar a similar control before where it does work, but after a little tweaking it doesn't seem to work.

Thank you for your help in advance
ni5ni6
Posted: Tuesday, August 19, 2008 9:39:56 AM
Rank: Enthusiast

Joined: 12/18/2007
Posts: 34
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.