views:

46

answers:

2

Really sorry because this is almost "please send me the code" - although really it's "please send me a link to another discussion"

I am setting up a .net membership system and need to validate users from the email address they provide via a "click here to validate your account" type link.

Just wondered if anyone knew of any good tutorials or posts out there about this? I have searched for about an hour and can't find anything - hence me asking the question.

Thanks in advance. Rob

+1  A: 

This is very easy, once they submit their application form, log a "token" variable, dispatch your email, add the token variable to the url, search for the token in the db, validate user...!! Simple.

Carlos Barbosa
Thanks - I did have that thought but was just checking best practice!
LiverpoolsNumber9
+1  A: 

When they are registering send them a hash of some of their data with a fixed salt. Stuff like time of registration and user-id. When they click the email link to something like /verify?q=ahash, just check to see which users data the hash amounts to, and update the database to reflect that they are a valid user.

Sam152
Thank you also - similar to the above. Great stuff!
LiverpoolsNumber9