tags:

views:

124

answers:

1

I've created a registration form control for a Sitecore site that will create a Sitecore user for registration. However, I need to implement some authorisation of the account before the user can log in with it and want to set the account to be disabled on creation.

I've been making use of the Security.Accounts.User class to achieve this so far, but can't seem to find anything in the Sitecore API that will allow me to disable the account. I know it is possible to disable accounts as the GUI contains a button to do this. Is there a way to achieve this programatically or am I looking for something that isn't there?

I'm using Sitecore 6.0 rev 090120.

+1  A: 

a MembershipUser has an .IsApproved property (get; set;) which I gather is basically in place to solve the same issue you are addressing here.

What you are looking for is actually more of a regular ASP.NET issue than a Sitecore issue. I found this thread to be particularly helpful; http://forums.asp.net/t/1035758.aspx; and hopefully should help you along as well.

Mark Cassidy