Register users

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have an web application to register users with username, password, email,
etc...

I the database i have a field with name: "activate" that its a bit field, 1
account activated, 0 account not activated...

My application works well, when a user wants to registers complete the form,
add this user to the database, and if the user is added, sends an email to
the account that the user put in the form.

In this email i put a link with the querystring id="xxx" and when the user
clicks in this link the user is activated and from that moment the user can
make log-in into the portal...

My question is:

I would like to encrypt the querystring to avoid that any user knows how the
activation of a user works...

What kind of encrypt its better to use in this case?

Any advice would be grateful?
 
Generate a very random string (like sequence of 20 random characters)
and then store that in a database table along with the user id. Make
sure it's unique (being a little paranoid here, but always good to
check to make sure that you don't hit the 1 in 10000000000000000...
chance that the string is the same as one generated earlier).

Send that random string to the user in the e-mail and then in the apsx
page look up the user based on this key. When found, activate the
user, and remove the random string from the database table (it's no
longer needed).

HTH,

Sam


Hi,

I have an web application to register users with username, password, email,
etc...

I the database i have a field with name: "activate" that its a bit field, 1
account activated, 0 account not activated...

My application works well, when a user wants to registers complete the form,
add this user to the database, and if the user is added, sends an email to
the account that the user put in the form.

In this email i put a link with the querystring id="xxx" and when the user
clicks in this link the user is activated and from that moment the user can
make log-in into the portal...

My question is:

I would like to encrypt the querystring to avoid that any user knows how the
activation of a user works...

What kind of encrypt its better to use in this case?

Any advice would be grateful?

B-Line is now hiring one Washington D.C. area VB.NET
developer for WinForms + WebServices position.
Seaking mid to senior level developer. For
information or to apply e-mail resume to
sam_blinex_com.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Membership class api 2
Detect user activity 1

Back
Top