]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
optionally send welcome email in installforemail.php
authorEvan Prodromou <evan@status.net>
Wed, 4 May 2011 18:10:21 +0000 (11:10 -0700)
committerEvan Prodromou <evan@status.net>
Wed, 4 May 2011 18:10:21 +0000 (11:10 -0700)
plugins/DomainStatusNetwork/scripts/installforemail.php

index a1f7a65cd30fbd9f341d7c645270037ff87c6b4b..037e0cad1f1ce95eede293f2ab8e70c992460d94 100644 (file)
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
 
+$shortoptions = 'w';
+$longoptions = array('welcome');
+
 $helptext = <<<END_OF_INSTALLFOREMAIL_HELP
+
 installforemail.php [options] <email address>
+Create a new account and, if necessary, a new network for the given email address
+
+-w --welcome  Send a welcome email
 
 END_OF_INSTALLFOREMAIL_HELP;
 
@@ -54,6 +61,10 @@ StatusNet::switchSite($sn->nickname);
 
 $confirm = EmailRegistrationPlugin::registerEmail($email);
 
+if (have_option('w', 'welcome')) {
+    EmailRegistrationPlugin::sendConfirmEmail($confirm);
+}
+
 $confirmUrl = common_local_url('register', array('code' => $confirm->code));
 
 print $confirmUrl."\n";