rscott7706 Posted August 12, 2006 Share Posted August 12, 2006 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 namelast namecompanydesired usernamedesired passwordThe 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? Quote Link to comment Share on other sites More sharing options...
Jocka Posted August 12, 2006 Share Posted August 12, 2006 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=ab4265adfow6742cthen activate.php would compaire the code to any unactivated codes in the database and if it matches, then it would activate that account. Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted August 12, 2006 Author Share Posted August 12, 2006 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. :) Quote Link to comment Share on other sites More sharing options...
Jocka Posted August 12, 2006 Share Posted August 12, 2006 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] Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted August 12, 2006 Author Share Posted August 12, 2006 Cool... Thanks - I will try this.See ya.... 8) Quote Link to comment Share on other sites More sharing options...
whare Posted August 12, 2006 Share Posted August 12, 2006 Hay try this by phpfreakhttp://www.phpfreaks.com/tutorials/40/0.phpUsed 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 helpsWhare Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted August 13, 2006 Author Share Posted August 13, 2006 Thanks Whare - I will try it. 8) Quote Link to comment Share on other sites More sharing options...
AdRock Posted August 13, 2006 Share Posted August 13, 2006 try this one too.http://www.plus2net.com/php_tutorial/php_change_password.php Quote Link to comment 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.