I have the following issue: when a user Sign up on my site I want to send him a mail containing a link. In order to activate his account, the user has to check that link.
The link should be accessible only once.

How is that possible? What mechanism do I have?

Recommended Answers

All 2 Replies

First generate a key. Since you want this to be unique, you can base it on, say the username and the current Universal date, encrypted with your fave encryption method. Store it in a "to be confirmed" list along with the information about user name, password, email, so on. Then send the link to the confirmation page with ?code=<thegeneratedkey>. That page should look it up in the to be confirmed list, pick up all the data stored there and add them to the members list, delete the entry in the to be confirmed list and do whatever else you want it to do.

Is this clear, or do you want chapter and verse?

First generate a key. Since you want this to be unique, you can base it on, say the username and the current Universal date, encrypted with your fave encryption method. Store it in a "to be confirmed" list along with the information about user name, password, email, so on. Then send the link to the confirmation page with ?code=<thegeneratedkey>. That page should look it up in the to be confirmed list, pick up all the data stored there and add them to the members list, delete the entry in the to be confirmed list and do whatever else you want it to do.

Is this clear, or do you want chapter and verse?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.