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?
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
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://’ . $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
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
<form method=”post” action=”<?php echo ‘http://’ . $current_site->domain . $current_site->path ?>wp-activate.php”>
doesn’t work.. have you called the global $current_site first?
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