mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
[ticket/16649] Upgrade to Symfony 5
PHPBB3-16649
This commit is contained in:
@@ -20,6 +20,7 @@ use phpbb\log\log_interface;
|
||||
use phpbb\notification\manager;
|
||||
use phpbb\user;
|
||||
use phpbb\user_loader;
|
||||
use Symfony\Component\Console\Command\Command as symfony_command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
@@ -137,19 +138,19 @@ class activate extends command
|
||||
if ($user_row['user_id'] == ANONYMOUS)
|
||||
{
|
||||
$io->error($this->language->lang('NO_USER'));
|
||||
return 1;
|
||||
return symfony_command::FAILURE;
|
||||
}
|
||||
|
||||
// Check if the user is already active (or inactive)
|
||||
if ($mode == 'activate' && $user_row['user_type'] != USER_INACTIVE)
|
||||
{
|
||||
$io->error($this->language->lang('CLI_DESCRIPTION_USER_ACTIVATE_ACTIVE'));
|
||||
return 1;
|
||||
return symfony_command::FAILURE;
|
||||
}
|
||||
else if ($mode == 'deactivate' && $user_row['user_type'] == USER_INACTIVE)
|
||||
{
|
||||
$io->error($this->language->lang('CLI_DESCRIPTION_USER_ACTIVATE_INACTIVE'));
|
||||
return 1;
|
||||
return symfony_command::FAILURE;
|
||||
}
|
||||
|
||||
// Activate the user account
|
||||
@@ -177,7 +178,7 @@ class activate extends command
|
||||
|
||||
$io->success($this->language->lang($msg));
|
||||
|
||||
return 0;
|
||||
return symfony_command::SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user