I am trying to figure out how to add a user programmatically in sitefinity 4. At the moment, I have a user control with a asp:CreateUserWizard on it. Anyone who comes to the site can register. And hence, I've named the user control 'RegisterUserControl'.
When creating the user, I have some code from an existing web application that would check if a specific role is not there, create if needed, and add the new user to the role.
Here is the code I have so far:
sender, LoginCancelEventArgs e)
TextBox firstNameTextbox = (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl(
TextBox lastNameTextbox = (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl(
TextBox emailTextbox = (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl(
memberRole = ConfigurationManager.AppSettings[
CreateUserWizard cuw = (CreateUserWizard)sender;
cuw.Email = cuw.UserName;
On 'if (!Roles.RoleExists(memberRole))' I get:
ProviderException was unhandled by user code.
The Role Manager feature has not been enabled.
I had created a previous thread about 'Role Manager feature has not been enabled?'. Here is the link
Now, in that case, I was able to get around the ProviderException by logging in as an admin user; however, in this case, I want the register page to be wide open so any one whom would come to the site can register.
How do I change settings in sitefinity or how do I enable the role manager feature?