Jump to content

Email Activation


SharkBait

Recommended Posts


How are they done in general?

Example:

  Joe signs up on a website, and they are emailed with an activation code.  They click on it and enter their password and their online account is activated.

I guess what I am looking for is, whats the best way to create the activation code? Random characters that are stored upon creation of the new account? Then get attached to the email in the form of some link that can be clicked on?

User clicks on the link, the url has the activation code in it, it's then queried against the database and checked if it matches or not?


Link to comment
Share on other sites

It is the same thing when someone get's approval denied.  Put it in the database, as 0 or 1, then I would put a date on it.  Have the homepage run a script whenever the admin signs in, or in a place where it get's checked, and anything that has been set to 0 for more than 2 days delete it from the database, this will remove unconfirmed accounts.
Link to comment
Share on other sites

[quote author=AdRock link=topic=105648.msg422157#msg422157 date=1156553523]
try this

[url=http://www.phpfreaks.com/tutorials/40/0.php]http://www.phpfreaks.com/tutorials/40/0.php[/url]
[/quote]

Ah I didnt think about using the MD5 hash for the authentication code.  Any reason not to use their password hash??
Link to comment
Share on other sites

I found another tutorial with something similar where it lets them choose their own password.  Using that and the code from the phpfreaks tutorial the user could choose their own passwrd and that is encrypted using md5.  Their email activation will contain their chosen password....heres the link [url=http://www.plus2net.com/php_tutorial/php_signup.php]http://www.plus2net.com/php_tutorial/php_signup.php[/url]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.