Although protection from rogue demo registrations exists within Easy Plugin Demo by using a combination of Google reCaptcha and a Honeypot, it is still possible for users to register for a demo site by using a fake email address. Which can be kinda frustrating.
In order to address this, since version 1.4 Easy Plugin Demo includes the option to require site activation. When in use, all newly created sites will be disabled and unusable until the requester activates the site. They do this by clicking an activation link which you can include within the confirmation email that is sent once they have successfully registered for a demo.
Enabling the Site Activation Feature
To turn on the Require Activation feature, from your network admin screen, head to Settings -> Easy Plugin Demo. Within the Sites tab, you will see the option to Require Activation. Check this option and click to Save Changes.
Ensuring Users Can Activate Their Sites
Once the Require Activation option has been enabled, we need to make sure that users have the ability to activate their newly created demo sites. We do this by including a link within the confirmation email they receive upon successful registration of a demo site.
From your network admin screen;
- Head to the Settings -> Easy Plugin Demo screen
- Click the Email tab
- Make sure that Disable Email Confirmation is not checked
- Scroll down to the Registration Content section and within the content include the email template tag
{demo_site_activation_url}
.
When the confirmation email is sent, the {demo_site_activation_url}
tag will be replaced with the URL that the user needs to click to activate their demo site.
You can simply include {demo_site_activation_url}
within the email content to output the raw URL, or you can use the tag as a link. Note however, that WordPress auto adds https:// to the beginning of links which will cause the activation link to be incorrect. Therefore, once you have created the link, be sure to remove https://. The link should be created as <a href="{demo_site_activation_url}">Custom Activation Text</a>
.