Jump to content

User Validation via Email


rscott7706

Recommended Posts

I had a simple but unique, open source, user authentication program some time back, but can't find it now.

It basically would provide a registration page, that allowed the web visitor to register by entering (may have had other fields, but these are what I need):
first name
last name
company
desired username
desired password

The script then posted to a database that contained a 'validate" field.  This field remained (0, 1, or just null - can't remember now).

Now here is the trick, when they submitted the form, it sent an email with a link to the "administrator"  and all the adminsitrator had to do was click on this link within the email and it would change the "validate" field from the one selection (not validated) to another (validated).

The reason I need it this way is the "admin" is an administrative assistant for a non-profit company I am helping.  She is not computer savy to this extent so the email verification is just the 'cats pajamas"...

Most validation programs either approve the user right away, or require the admin logs on to an admin panel to approve the person registering.

Does this strike a cord in anyone?
Link to comment
Share on other sites

when it saves in the database with "activiation" being 0 or null, it should also save an activation code. Then when you click the email it would send you to something like

http://www.yoursite.com/activate.php?code=ab4265adfow6742c

then activate.php would compaire the code to any unactivated codes in the database and if it matches, then it would activate that account.
Link to comment
Share on other sites

Right - gottcha...  And most of the routines I have looked at have that capability (the validation code) except they place the request in the admin panel.  I would like the activation code to be sent to an email address.  There is where my lack of programming limits me.

:)
Link to comment
Share on other sites

well just edit that very page. When they sign up and it goes to put everything in the database, right after, you should add a code like this:
[code]
$email = "youremail@thissite.com";
$headers = 'From: Admin <admin@thissite.com>';
$subject = $username . " Needs Activated";
$msg = $username . " needs to be activated./n/n";
$msg .= "Here is your link: http://www.yoursite.com/activation.php?code=" . $activation_code . ";

if(mail($email, $subject, $msg, $headers)){
  // DONE, IT WORKED, DO WHAT YOU WANT HERE
} else {
  // DIDN'T WORK, GO BACK OR KILL THE PAGE HERE
}
[/code]
Link to comment
Share on other sites

Hay try this by phpfreak

http://www.phpfreaks.com/tutorials/40/0.php

Used the system to test it and I have now created another system from it that works alot better for me (going to be asking for more help with it though lol) it does have all of your activation by email ect on it so just ahve a look :)

Hope this helps
Whare
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.