Hi,
I am basically trying to implement an e-mail address verification into the CreateUserWizard, you know the ones that send you a verification code by e-mail and you have to enter that verification code before you log in...
So far what I've done is to handle the CreatedUser event of the control and sent the user a randomly geneated code by e-mail, and then set IsApproved on the user to false. What I need to do now is store that verification code against the user somewhere. What's my best option for doing this? I've considered:
- Modifying the database in some way to store the code, either append it to the aspnet_User or aspnet_Membership tables or by putting it in a new table... then manually connecting to the database and storing the valu
- I also use the Profile provider, however the Profile of the user isn't available at the CreateUser stage, so I don't know how to set the value...
- I was thinking of inheriting the MembershipUser class to add a ValidationCode field, but I don't see the point in that seeing as I'd still have to manualy connect to the database to get and set the verification code because the MembershipUser class doesn't expose anything to inheritors to help store information. (Am I trying to inherit from the wrong class here?)
Can anyone give some advice? Or point me in the direction of a tutorial on this subject would be great!
Many thanks,
Alexia