So far as what happens when the user clicks on the URL in the email, I think it's so simple it many never have been thought to make into a module. Your solution works fine, although here's how I tend to implement it:

I create a "temp" table, separate from the user table. Populate said table with the password the user chose, the one-off id field for the new user that's in the URL you emailed, and that user's ID in the "real" user's field (and, possibly, a timestamp). When your app sees the URL, it queries the "temp" table, and simply loads the real password into the correct row of the user table, and then deletes that entry in the temp table.

This provides you with an extra layer of security, and a way of cleaning up "false setups" without touching your user table (daily cron job to clean out x days old entries in "temp" column). It also means one less column to "drag" around for the user table; if it's queried often, lightweight is best, esp. if a field/column's to be used once.

Make sense?

----Asim, known to some as Woodrow.


In reply to Re: Easy Account Email Verification by Asim
in thread Easy Account Email Verification by debiandude

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.