diff options
author | Matt Friedman <maf675@gmail.com> | 2016-02-29 16:52:17 -0800 |
---|---|---|
committer | Matt Friedman <maf675@gmail.com> | 2016-02-29 16:52:17 -0800 |
commit | e905c6226db367ab3a04e373bee56a85d8251cc7 (patch) | |
tree | 58077ba2bb7cf70fdbdb3e1a4cf4c69718659661 | |
parent | 97c6cce687d94071d6f902af272631c21dbacfcb (diff) | |
download | forums-e905c6226db367ab3a04e373bee56a85d8251cc7.tar forums-e905c6226db367ab3a04e373bee56a85d8251cc7.tar.gz forums-e905c6226db367ab3a04e373bee56a85d8251cc7.tar.bz2 forums-e905c6226db367ab3a04e373bee56a85d8251cc7.tar.xz forums-e905c6226db367ab3a04e373bee56a85d8251cc7.zip |
[ticket/12684] Fix a few mistakes and clean it up
PHPBB3-12684
-rw-r--r-- | phpBB/phpbb/console/command/user/add.php | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/phpBB/phpbb/console/command/user/add.php b/phpBB/phpbb/console/command/user/add.php index d85c9599c5..59d9eaa117 100644 --- a/phpBB/phpbb/console/command/user/add.php +++ b/phpBB/phpbb/console/command/user/add.php @@ -82,10 +82,30 @@ class add extends \phpbb\console\command\command $this ->setName('user:add') ->setDescription($this->language->lang('CLI_DESCRIPTION_USER_ADD')) - ->addOption('username', null, InputOption::VALUE_REQUIRED, $this->language->lang('CLI_DESCRIPTION_USER_ADD_OPTION_USERNAME')) - ->addOption('password', null, InputOption::VALUE_REQUIRED, $this->language->lang('CLI_DESCRIPTION_USER_ADD_OPTION_PASSWORD')) - ->addOption('email', null, InputOption::VALUE_REQUIRED, $this->language->lang('CLI_DESCRIPTION_USER_ADD_OPTION_EMAIL')) - ->addOption('send-email', null, InputOption::VALUE_NONE, $this->language->lang('CLI_CONFIG_PRINT_WITHOUT_NEWLINE')) + ->addOption( + 'username', + null, + InputOption::VALUE_REQUIRED, + $this->language->lang('CLI_DESCRIPTION_USER_ADD_OPTION_USERNAME') + ) + ->addOption( + 'password', + null, + InputOption::VALUE_REQUIRED, + $this->language->lang('CLI_DESCRIPTION_USER_ADD_OPTION_PASSWORD') + ) + ->addOption( + 'email', + null, + InputOption::VALUE_REQUIRED, + $this->language->lang('CLI_DESCRIPTION_USER_ADD_OPTION_EMAIL') + ) + ->addOption( + 'send-email', + null, + InputOption::VALUE_NONE, + $this->language->lang('CLI_DESCRIPTION_USER_ADD_OPTION_NOTIFY') + ) ; } @@ -271,13 +291,9 @@ class add extends \phpbb\console\command\command } $messenger = new \messenger(false); - $messenger->template($email_template, $this->user->lang_name); - $messenger->to($data['email'], $data['username']); - $messenger->anti_abuse_headers($this->config, $this->user); - $messenger->assign_vars(array( 'WELCOME_MSG' => htmlspecialchars_decode($this->language->lang('WELCOME_SUBJECT', $this->config['sitename'])), 'USERNAME' => htmlspecialchars_decode($data['username']), |