Verifying user's email address

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi all,

In my recent ASP.NET 2.0 appl, I need to verify that the supplied email address is valid or not. So, here's my situation:
- In my <profile> area, I created <isVerified> property.
- Suppose a new user has been created. I set the profile.isverified to false.
OnCreatedUser event I'll send him an email (to the supplied email address) to verify their email address with a link in it to an ASPX page that'll do the verification, e.g: verify.aspx?u=aUserName
- On page_load of verify.aspx, I want to change the <isVerified> property to true and set the <isApproved> to true, so he can start log in.

How to do this? I'm using ASP.NET 2.0 (VB.NET) and MSSQL 2K for membership database.

Thanks in advance,
Mike
 
To accomplish this I normally tie in the "IsVerified" or "IsApproved"
properties to your membership table in MSSQL. Create a bit field called
"IsVerified" or "IsApproved" when the account is created, it will be
set to false(0) by default. Upon them receiving an email and clicking a
link that you provide, it will update the fields to true(1). You should
also check these fields when the login method is called from your
login object. This is the way I normally do it, if there is a better
way I'd like to hear it!
 
I just realized that this sentence in my reply..

"Create a bit field called
"IsVerified" or "IsApproved" when the account is created"

should read

"Create a bit field called IsVerified or IsApproved in your membership
table, then when the account is created, it will be
set to false(0) by default."

sorry
 
Thanks for the reply,

'IsVerified' is my own created property in the profile, as opposed to the
'IsApproved' which is .NET 2.0 membership built-in property.

But, based on your suggestion I have an idea of creating an additional field
(that is: isVerified which is set to false by default) in the built-in
ASP.NET membership table (aspnet_users, I presummed?). But, my next question
is: Would it be tampered ASP.NET built-in membership functionality,as it
altered the standard schema its created?

Thanks,
Andy
 
Ok, I'll try that out (my prev post), and let you know the result.

Thanks,
Andy

Hi all,

In my recent ASP.NET 2.0 appl, I need to verify that the supplied email address is valid or not. So, here's my situation:
- In my <profile> area, I created <isVerified> property.
- Suppose a new user has been created. I set the profile.isverified to false.
OnCreatedUser event I'll send him an email (to the supplied email address) to verify their email address with a link in it to an ASPX page that'll do the verification, e.g: verify.aspx?u=aUserName
- On page_load of verify.aspx, I want to change the <isVerified> property to true and set the <isApproved> to true, so he can start log in.

How to do this? I'm using ASP.NET 2.0 (VB.NET) and MSSQL 2K for membership database.

Thanks in advance,
Mike
 
Back
Top