SharkBait Posted August 25, 2006 Share Posted August 25, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/18675-email-activation/ Share on other sites More sharing options...
hostfreak Posted August 25, 2006 Share Posted August 25, 2006 You pretty much answered your own question. I am sure there are other ways to do it though. Quote Link to comment https://forums.phpfreaks.com/topic/18675-email-activation/#findComment-80507 Share on other sites More sharing options...
AdRock Posted August 26, 2006 Share Posted August 26, 2006 try this[url=http://www.phpfreaks.com/tutorials/40/0.php]http://www.phpfreaks.com/tutorials/40/0.php[/url] Quote Link to comment https://forums.phpfreaks.com/topic/18675-email-activation/#findComment-80529 Share on other sites More sharing options...
Ninjakreborn Posted August 26, 2006 Share Posted August 26, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/18675-email-activation/#findComment-80543 Share on other sites More sharing options...
SharkBait Posted August 28, 2006 Author Share Posted August 28, 2006 [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?? Quote Link to comment https://forums.phpfreaks.com/topic/18675-email-activation/#findComment-81671 Share on other sites More sharing options...
AdRock Posted August 28, 2006 Share Posted August 28, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/18675-email-activation/#findComment-81677 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.