Jump to content


Photo

Email Activation


  • Please log in to reply
5 replies to this topic

#1 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 25 August 2006 - 10:25 PM


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?




#2 hostfreak

hostfreak
  • Members
  • PipPipPip
  • Advanced Member
  • 581 posts

Posted 25 August 2006 - 10:39 PM

You pretty much answered your own question. I am sure there are other ways to do it though.

#3 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 26 August 2006 - 12:52 AM

try this

http://www.phpfreaks...orials/40/0.php
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 26 August 2006 - 01:44 AM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#5 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 28 August 2006 - 04:00 PM

try this

http://www.phpfreaks...orials/40/0.php


Ah I didnt think about using the MD5 hash for the authentication code.  Any reason not to use their password hash??

#6 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 28 August 2006 - 04:14 PM

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 http://www.plus2net..../php_signup.php
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users