]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
send a confirmation email when registering by script
authorEvan Prodromou <evan@status.net>
Wed, 4 May 2011 18:05:38 +0000 (11:05 -0700)
committerEvan Prodromou <evan@status.net>
Wed, 4 May 2011 18:05:38 +0000 (11:05 -0700)
plugins/EmailRegistration/scripts/registeremailuser.php

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