Skip to:
Content
Pages
Categories
Search
Top
Bottom

Skipping the activation email – have I got the theory right?

  • @devweb

    Participant

    Hi

    Not tried it yet, but wanted to get an opinion and see if anyone else has tried it, but I want to skip the activation email and have the user get their username and password on screen after signing up.

    So heres my theory:

    Change the page that currently contains the ‘check your email’ page to include an ‘activate account now’ button (Not sure how going to tackle the sending of the email yet).

    Once pressed this activates a script that retrieves the key from the DB and puts it into the correct URL which then takes the user to the page that shows them their login details.

    Any thoughts?

    Thanks very much

    DW

Viewing 7 replies - 1 through 7 (of 7 total)
  • @johnjamesjacoby

    Keymaster

    Well, if I understand correctly it certainly seems possible, considering its pretty much the way that WordPress installation goes.

    You install WordPress and are provided a login (“admin”) and a randomized password.

    If you’re looking for code to try to tap into, or an example of how to go about it, that would be where I would look first?

    The next step in your theory would be to consider how to handle spam registrations in the event that user never sees the pw and never logs in to your website. Maybe take a look at the Register Plus plugin for WordPress.org to get some ideas also?

    @devweb

    Participant

    I have reCAPTCHA installed and TOS with tick box, I also have the password plugin installed which seems to be working nicely so that the user can create their own password.

    Thanks for confirming, I shall give this a go and see what happens!

    Cheers J

    @devweb

    Participant

    Can any one tell me what function I might place into the ‘action’ field for the form that finds the key and takes you to the activation page?

    <form method=”post” action=”<?php echo ‘http://&#8217; . $current_site->domain . $current_site->path ?>wp-activate.php”>

    <input type=”submit” name=”activation” value=”Activate now” />

    </form>

    This is completely wrong I know as it takes me to http://wp-activate.php!

    Thanks again

    @johnjamesjacoby

    Keymaster

    Try get_option('home') ;)

    @devweb

    Participant

    J, thanks for the suggestion, but unfortunately that just takes you back to the registration page.

    I’m thinking along the lines of using the predefined ‘user_name’ which identifies the user, then the activation key is ‘activation_key’ in the MySQL DB. I need to use the ‘user_name’ to call the equivalent activation key and I think ‘&_GET’ to the activation page by having the activation key placed into a url.

    Anyone have any idea how to do this or have any suggestions?

    Cheers all

    @nicolagreco

    Participant

    <form method=”post” action=”<?php echo ‘http://&#8217; . $current_site->domain . $current_site->path ?>wp-activate.php”>

    doesn’t work.. have you called the global $current_site first?

    @devweb

    Participant

    HAve this so far:

    <form method=”post” action=”<?php echo site_url(‘activate?key=$user_name’); ?>”>

    <input type=”submit” name=”activation” value=”Activate now” />

    </form>

    This returns ‘incorrect activation key’ – great, on the right road.

    Now in place of $user_name, I need a function, but I can’t figure out how to get it in. I thought maybe putting this in there would do the trick:

    $key = @mysql_query(‘SELECT activation_key FROM wp_signups WHERE login_user=$user_name’);

    Then

    <form method=”post” action=”<?php echo site_url(‘activate?key=$key’); ?>”>

    <input type=”submit” name=”activation” value=”Activate now” />

    </form>

    Don’t think the syntax is right above and neither is it in the form above, Nicolagreco or J can you lend your expertise?

    Thanks very much

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Skipping the activation email – have I got the theory right?’ is closed to new replies.
Skip to toolbar