Results 1 to 7 of 7

Thread: User Authentication with E-Mail...

  1. #1
    Join Date
    Jan 2003
    Location
    DE
    Posts
    27

    User Authentication with E-Mail...

    Hi y'all,

    today I am facing the problem of authenticating users who are willing to register on our page. I want an email to be sent to each user while registering with a link in it to verify the account and (email)adress...

    Does anyone have a resource for a script, I bet there are matching scripts for this purpose. I'm just tooooo lazy to write one for myself,

    Thanks for any helpful link or experience.

    Tom

  2. #2
    Join Date
    Feb 2003
    Location
    Johannesburg, South Africa
    Posts
    145
    A quick search at google.com seems to have returned a number of positive hits...

    Cheers

  3. #3
    Join Date
    Jan 2003
    Location
    DE
    Posts
    27

    I know...

    I wouldn't have posted here without having checked some things at least before... These resources all seem to be very scattered about real results. One can hardly distinguish if something is usefull or not, so I am asking you: Has anybody already made experience of some sort with scripts like that?

  4. #4
    Join Date
    Feb 2003
    Location
    Johannesburg, South Africa
    Posts
    145
    Here is how I do it - all Perl based, and I can mail you the scripts tommorow if you want to have a look:

    Step 1
    User completes form. Required fields: username, e-mail

    Step 2
    Script creates initial DB entries, with status field 'disabled' and sets a MD5 string in the verify column.

    Step 3
    Mail user the activiation mail, including a link to click for activiation. This link includes an encrypted version of the MD5 in the DB, along with the userid/username

    Step 4
    User clicks on link, and the script then verifies the MD5 string. If it matches, prompt for a password ( with verification ). Once the password is set, the account is enabled, and the verify column is set to NULL.

    Then I also have some cleanwork at regular intervals, that basically remove the accounts that has not been verified in 72 hours.

    This technique is inline with many other to ensure that the e-mail account exists before the account is activated. One reason for doing this, is that we may need to mail a re-activiation mail if the user forgets his/her password.

    Let me know if you would like to have a look at the scripts.

    Cheers

  5. #5
    Join Date
    Jan 2003
    Location
    DE
    Posts
    27

    YEAH!

    Now that's what I'm talking about!!!
    Yo, if you don't mind let me have a look at these scripts...
    That's exactly what I'm looking for.

    Tom

  6. #6
    Join Date
    Feb 2003
    Location
    Johannesburg, South Africa
    Posts
    145
    In the ZIP file is a tar.gz file ( due to the forum restrictions ).

    It contains a pure CGI example. All you have to do to get it to work is to set the database username and password in every file. Then copy it to /var/www/cgi-bin ( or equiv. ) and point your browser to http://127.0.0.1/cgi-bin/index.pl

    O boy - I forgot - you should also use the supplied SQL file to create your DB. I just used the default test table and it's still setup like that.

    Naturally I assume you use Linux, but it should still work with little/no modification on Windows and other platforms.

    The e-mail doesn't actually work - you have to write your own code here. Rather, I print debug info to the web browser which is similar to the message that will be sent to the user's e-mail. You just copy the URL and paste it in the web browser. ( in Linux, double click the URL to select, and third-button-click to load in the same browser window ).

    I use this as a framework only. I actually have a much larger framwork with theme integration etc., but I scaled down to present you with this.

    Enjoy!
    Attached Files Attached Files

  7. #7
    Join Date
    Jan 2003
    Location
    DE
    Posts
    27

    Thumbs up Still on weekend...

    Hey thaks for your assistance...
    I just downloaded the code and in the next few days I'll have a closer look at that.

    Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •