McGurk1
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.
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.
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"
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect!!!! Thank you for answering so quickly.
I put the code in the CreateUserWizard1_CreatedU ser sub.
I put the code in the CreateUserWizard1_CreatedU
ASKER