From b4910066b69892b2efe16473fcd9cbeb87306f7f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 6 Jul 2020 15:25:49 -0400 Subject: [PATCH 1/2] Rename -q option to -y for user delete console command - Name was misleading, it isn't quiet mode but non-interactive mode --- src/Console/User.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Console/User.php b/src/Console/User.php index a135e6292..bbe65d87c 100644 --- a/src/Console/User.php +++ b/src/Console/User.php @@ -59,7 +59,7 @@ console user - Modify user settings per console commands. Usage bin/console user password [] [-h|--help|-?] [-v] bin/console user add [ [ [ []]]] [-h|--help|-?] [-v] - bin/console user delete [] [-q] [-h|--help|-?] [-v] + bin/console user delete [] [-y] [-h|--help|-?] [-v] bin/console user allow [] [-h|--help|-?] [-v] bin/console user deny [] [-h|--help|-?] [-v] bin/console user block [] [-h|--help|-?] [-v] @@ -78,8 +78,8 @@ Description Options -h|--help|-? Show help information - -v Show more debug information. - -q Quiet mode (don't ask for a command). + -v Show more debug information + -y Non-interactive mode, assume "yes" as answer to the user deletion prompt HELP; return $help; } @@ -314,7 +314,7 @@ HELP; return true; } - if (!$this->getOption('q')) { + if (!$this->getOption('y')) { $this->out($this->l10n->t('Type "yes" to delete %s', $nick)); if (CliPrompt::prompt() !== 'yes') { throw new RuntimeException($this->l10n->t('Deletion aborted.')); From 6cde7afa535eb943eb30508cf1d0b650946180c5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 6 Jul 2020 15:26:39 -0400 Subject: [PATCH 2/2] Exclude deleted user accounts from "active" user list in Model\User --- src/Model/User.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Model/User.php b/src/Model/User.php index b561a7912..16dfb5122 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -1321,6 +1321,7 @@ class User $condition = []; switch ($type) { case 'active': + $condition['account_removed'] = false; $condition['blocked'] = false; break; case 'blocked':