account validation in asp.net
-
Hi, Im using the membership provider in asp.net2.0 - excellent. Ive read some chapters on this and the documentation on msdn and got everything configured how i like. however, i would like each user to be validated/activated by email before they can use the site. Using standard methods by sending an email to the address on their account with a guid link - the account then gets activated when they click the link in the email. While im quite happy to code this up myself im pretty surprised that there isnt any support 'out of the box'. One problem i see is that there is no 'activated' flag in the aspnet_users table. I gather i can implement this by adding my own custom fields to the profile via web.config. Anyone have any advice or workarounds on this matter? Thanks in advance for any contributions.
---Guy H (;-)---
-
Hi, Im using the membership provider in asp.net2.0 - excellent. Ive read some chapters on this and the documentation on msdn and got everything configured how i like. however, i would like each user to be validated/activated by email before they can use the site. Using standard methods by sending an email to the address on their account with a guid link - the account then gets activated when they click the link in the email. While im quite happy to code this up myself im pretty surprised that there isnt any support 'out of the box'. One problem i see is that there is no 'activated' flag in the aspnet_users table. I gather i can implement this by adding my own custom fields to the profile via web.config. Anyone have any advice or workarounds on this matter? Thanks in advance for any contributions.
---Guy H (;-)---
System.Web.Security.Membership.CreateUser[^]. has a boolean parameter 'isApproved'. You could set that to false when the account is created. Then when the user clicks on the link in your email you could set the System.Web.Security.MembershipUser.IsApproved[^] property to true
-
System.Web.Security.Membership.CreateUser[^]. has a boolean parameter 'isApproved'. You could set that to false when the account is created. Then when the user clicks on the link in your email you could set the System.Web.Security.MembershipUser.IsApproved[^] property to true
Thanks for your reply mark. Ive been skirting around the tables and noticed this flag in aspnet_membership. The book ive been reading doesnt really go very deep into the membership stuff so i think maybe some more research is going to be beneficial. :-D
---Guy H (;-)---