send a confirmation email when registering by script

This commit is contained in:
Evan Prodromou 2011-05-04 11:05:38 -07:00
parent be57e253fb
commit 914de296a1

View File

@ -20,11 +20,14 @@
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
$shortoptions = 'w';
$longoptions = array('welcome');
$helptext = <<<END_OF_REGISTEREMAILUSER_HELP $helptext = <<<END_OF_REGISTEREMAILUSER_HELP
registeremailuser.php [options] <email address> registeremailuser.php [options] <email address>
Options: Options:
-e --email Send a confirmation message to the email address -w --welcome Send a welcome email
register a new user by email address. register a new user by email address.
@ -40,7 +43,7 @@ $email = $args[0];
$confirm = EmailRegistrationPlugin::registerEmail($email); $confirm = EmailRegistrationPlugin::registerEmail($email);
if (have_option('e', 'email')) { if (have_option('w', 'welcome')) {
EmailRegistrationPlugin::sendConfirmEmail($confirm); EmailRegistrationPlugin::sendConfirmEmail($confirm);
} }