/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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);
URL: http://www.heartysoft.com/post/2009/06/13/How-to-Programmatically-Logout-Disable-a-User-Account.aspx