fix shell-select for customer ftp-accounts if shell is enabled; fix typo in UserCommand
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -133,8 +133,11 @@ if ($page == 'overview' || $page == 'accounts') {
|
||||
$shells['/bin/false'] = "/bin/false";
|
||||
$shells_avail = Settings::Get('system.available_shells');
|
||||
if (!empty($shells_avail)) {
|
||||
$shells_avail = explode(",", $shells_avail);
|
||||
$shells_avail = array_map("trim", $shells_avail);
|
||||
$shells_avail_arr = explode(",", $shells_avail);
|
||||
$shells_avail_arr = array_map("trim", $shells_avail_arr);
|
||||
foreach ($shells_avail_arr as $shell) {
|
||||
$shells[$shell] = $shell;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,8 +183,11 @@ if ($page == 'overview' || $page == 'accounts') {
|
||||
$shells['/bin/false'] = "/bin/false";
|
||||
$shells_avail = Settings::Get('system.available_shells');
|
||||
if (!empty($shells_avail)) {
|
||||
$shells_avail = explode(",", $shells_avail);
|
||||
$shells_avail = array_map("trim", $shells_avail);
|
||||
$shells_avail_arr = explode(",", $shells_avail);
|
||||
$shells_avail_arr = array_map("trim", $shells_avail_arr);
|
||||
foreach ($shells_avail_arr as $shell) {
|
||||
$shells[$shell] = $shell;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ final class UserCommand extends CliCommand
|
||||
$this->setDescription('Various user actions');
|
||||
$this->addArgument('user', InputArgument::REQUIRED, 'Loginname of the target user')
|
||||
->addArgument('admin', InputArgument::OPTIONAL, 'Loginname of the executing admin/reseller user', 'admin');
|
||||
$this->addOption('unlock', 'u', InputOption::VALUE_NONE, 'Unock user after too many failed login attempts')
|
||||
$this->addOption('unlock', 'u', InputOption::VALUE_NONE, 'Unlock user after too many failed login attempts')
|
||||
->addOption('change-passwd', 'p', InputOption::VALUE_NONE, 'Set new password for given user')
|
||||
->addOption('show-info', 's', InputOption::VALUE_NONE, 'Output information details of given user');
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ return [
|
||||
'visible' => Settings::Get('system.allow_customer_shell') == '1',
|
||||
'label' => lng('panel.shell'),
|
||||
'type' => 'select',
|
||||
'select_var' => $shells_avail,
|
||||
'select_var' => $shells,
|
||||
'selected' => '/bin/false'
|
||||
]
|
||||
]
|
||||
|
||||
@@ -61,7 +61,7 @@ return [
|
||||
'visible' => Settings::Get('system.allow_customer_shell') == '1',
|
||||
'label' => lng('panel.shell'),
|
||||
'type' => 'select',
|
||||
'select_var' => $shells_avail,
|
||||
'select_var' => $shells,
|
||||
'selected' => $result['shell'] ?? '/bin/false'
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user