1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-18 06:21:19 +02:00

[ticket/17135] Remove SMTP auth method option

Symfony Mailer handles SMTP auth method internally.

PHPBB3-17135
This commit is contained in:
rxu
2023-05-05 23:31:01 +07:00
parent 715496b76d
commit d5f411a16d
12 changed files with 38 additions and 62 deletions

View File

@@ -0,0 +1,38 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\db\migration\data\v400;
use phpbb\db\migration\migration;
class remove_smtp_auth_method extends migration
{
public function effectively_installed()
{
return !$this->config->offsetExists('smtp_auth_method');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v400\dev',
];
}
public function update_data()
{
return [
['config.remove', ['smtp_auth_method']],
];
}
}

View File

@@ -195,7 +195,6 @@ class install extends \phpbb\console\command\command
$iohandler->set_input('smtp_delivery', $config['email']['smtp_delivery']);
$iohandler->set_input('smtp_host', $config['email']['smtp_host']);
$iohandler->set_input('smtp_port', $config['email']['smtp_port']);
$iohandler->set_input('smtp_auth', $config['email']['smtp_auth']);
$iohandler->set_input('smtp_user', $config['email']['smtp_user']);
$iohandler->set_input('smtp_pass', $config['email']['smtp_pass']);
$iohandler->set_input('submit_email', 'submit');

View File

@@ -97,9 +97,6 @@ class installer_configuration implements ConfigurationInterface
->scalarNode('smtp_port')
->defaultValue(null)
->end()
->scalarNode('smtp_auth')
->defaultValue(null)
->end()
->scalarNode('smtp_user')
->defaultValue(null)
->end()

View File

@@ -150,7 +150,6 @@ class add_config_settings extends database_task
'smtp_delivery' => $this->install_config->get('smtp_delivery'),
'smtp_host' => $this->install_config->get('smtp_host'),
'smtp_port' => $this->install_config->get('smtp_port'),
'smtp_auth_method' => $this->install_config->get('smtp_auth'),
'smtp_username' => $this->install_config->get('smtp_user'),
'smtp_password' => $this->install_config->get('smtp_pass'),

View File

@@ -52,12 +52,9 @@ class obtain_email_data extends \phpbb\install\task_base implements \phpbb\insta
$smtp_delivery = $this->io_handler->get_input('smtp_delivery', '');
$smtp_host = $this->io_handler->get_input('smtp_host', '', true);
$smtp_port = $this->io_handler->get_input('smtp_port', '');
$smtp_auth = $this->io_handler->get_input('smtp_auth', '');
$smtp_user = $this->io_handler->get_input('smtp_user', '', true);
$smtp_passwd = $this->io_handler->get_input('smtp_pass', '', true);
$auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP');
// Check if data is sent
if ($this->io_handler->get_input('submit_email', false))
{
@@ -65,22 +62,11 @@ class obtain_email_data extends \phpbb\install\task_base implements \phpbb\insta
$this->install_config->set('smtp_delivery', $smtp_delivery);
$this->install_config->set('smtp_host', $smtp_host);
$this->install_config->set('smtp_port', $smtp_port);
$this->install_config->set('smtp_auth', $smtp_auth);
$this->install_config->set('smtp_user', $smtp_user);
$this->install_config->set('smtp_pass', $smtp_passwd);
}
else
{
$auth_options = array();
foreach ($auth_methods as $method)
{
$auth_options[] = array(
'value' => $method,
'label' => 'SMTP_' . str_replace('-', '_', $method),
'selected' => false,
);
}
$email_form = array(
'email_enable' => array(
'label' => 'ENABLE_EMAIL',
@@ -126,12 +112,6 @@ class obtain_email_data extends \phpbb\install\task_base implements \phpbb\insta
'type' => 'text',
'default' => $smtp_port,
),
'smtp_auth' => array(
'label' => 'SMTP_AUTH_METHOD',
'description' => 'SMTP_AUTH_METHOD_EXPLAIN',
'type' => 'select',
'options' => $auth_options,
),
'smtp_user' => array(
'label' => 'SMTP_USERNAME',
'description' => 'SMTP_USERNAME_EXPLAIN',