Upon registration to become a member of my site a confirmation email will be sent to the member. The email will contain a link to activate the members account. Example:

http://www.abc.com/activate.aspx?id=<memberId>

My question is if the memberId is visible, then a person can use this link over and over again by replacing the memberId. This will then cause many members account to be activated. Therefore how do I prevent this from happening?.

Your help is kindly appreciated.

Thank You.

Two quick options come to mind

(a) Make them validate themselves with their password.
(b) In lieu of or in addition to including the member ID in the link, include a randomly generated key that is uniquely associated with that member.

Randomly generated key like guid?.

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.