From 2e93d5e551ff807d907edab04a713f7462467428 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 21 Apr 2011 10:11:20 -0400 Subject: [PATCH] Script to register a user by email address --- .../scripts/registeremailuser.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 plugins/EmailRegistration/scripts/registeremailuser.php diff --git a/plugins/EmailRegistration/scripts/registeremailuser.php b/plugins/EmailRegistration/scripts/registeremailuser.php new file mode 100644 index 0000000000..1807fd7f9a --- /dev/null +++ b/plugins/EmailRegistration/scripts/registeremailuser.php @@ -0,0 +1,40 @@ +#!/usr/bin/env php +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); + +$helptext = << +register a new user by email address. + +END_OF_REGISTEREMAILUSER_HELP; + +require_once INSTALLDIR.'/scripts/commandline.inc'; + +if (count($args) == 0) { + show_help(); +} + +$email = $args[0]; + +$confirm = EmailRegistrationPlugin::registerEmail($email); +$confirmUrl = common_local_url('register', array('code' => $confirm->code)); + +print $confirmUrl."\n"; -- 2.39.5