Link to home
Start Free TrialLog in
Avatar of McGurk1
McGurk1Flag for United States of America

asked on

CreateUserWizard email field problem

I am using this wizard to create a form to allow users to register in my asp.net program.  
When a duplicate email address is entered, the wizard gives a message telling the user to enter a different email address.  All that is good.  However, and I have seen this happen in other apps on the web when I have tried to register, when the "user" tries to enter a different email address to complete the registration, the wizard errors with the message:  "The user 'myuser' is already in role 'myrole'." or "the user already exists".    I look in my db and the wizard has added the user to the users and usersinroles tables.  The result is the user is forced to start all over creating a different user name  because the wizard entered it into the database but will not allow the email to be changed. I added the following to the web config <providers> section but it does not help.
       requiresUniqueEmail="true"
                 enablePasswordRetrieval="false"
                 enablePasswordReset="true"

Open in new window


What I want to do is allow the user to enter a new email address if the email address is a duplicate and then have the createuserwizrd continue to create the appropriate records to complete the registration.

Haven't found any answers on the web yet.  Thanks for any help you may have on this.
ASKER CERTIFIED SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of McGurk1

ASKER

would help to indicate where to place the code
Avatar of McGurk1

ASKER

Perfect!!!!   Thank you for answering so quickly.

I put the code in the CreateUserWizard1_CreatedUser sub.