Register through url

I see a few possibilities.

  1. When you generate the emails (I don’t know how you are doing this
    but we’ll skip that), register an user for each email generated.
    Then track the user logins. If, after a week or so, the user has not
    logged in, delete the user.
  2. When you generate the emails, generate keys and store them in the
    $wpdb->options table. Your email link sends people to a page that
    checks for that key and adds users if the key is found.
  3. Send people to a registration page and automatically populate the
    email address based on the URL.

Approaches #1 and #2 are problematic in that there isn’t a way for users to chose their own usernames, though I suppose you could use the email address or part of it, though that undermines part of the login security system and potentially published email addresses to boot. Generated usernames will frustrate your users. I’d say they also have big potential for abuse unless you are very careful with implementation, and generate solid registration keys. These two will also be the most complicated to implement.

Option #3, is in my opinion the best of the three since 1) users can choose a username, and 2) none of the login security is compromised. The catch is that the default login page– login.php— uses POST which you cannot send over a link in an email so you’d need to create a page to process the link’s GET and submit it. It is also probably the most honest of the three and the least likely to provoke a “how the *$&% did I get registered on that site?” response.