Return to Snippet

Revision: 30829
at August 23, 2010 14:54 by skhan


Initial Code
MembershipUser user = Membership.GetUser(); //to block currently logged in user

MembershipUser user = Membership.GetUser("username"); //To block a specific user:

user.IsApproved = false;
Membership.UpdateUser(user);

Initial URL
http://www.heartysoft.com/post/2009/06/13/How-to-Programmatically-Logout-Disable-a-User-Account.aspx

Initial Description

                                

Initial Title
block the currently logged in / specific user from the system in (ASP.NET Membership)

Initial Tags
user

Initial Language
C#