From b432cc72c91793c24981d799a0eabbf03d5132da Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 4 May 2011 11:10:21 -0700 Subject: [PATCH] optionally send welcome email in installforemail.php --- .../DomainStatusNetwork/scripts/installforemail.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/DomainStatusNetwork/scripts/installforemail.php b/plugins/DomainStatusNetwork/scripts/installforemail.php index a1f7a65cd3..037e0cad1f 100644 --- a/plugins/DomainStatusNetwork/scripts/installforemail.php +++ b/plugins/DomainStatusNetwork/scripts/installforemail.php @@ -22,8 +22,15 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); +$shortoptions = 'w'; +$longoptions = array('welcome'); + $helptext = << +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";