diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 09:31:41 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 18:26:42 +0200 |
commit | 6c99bd00424892b3fbb9431b0ada65932aa90c33 (patch) | |
tree | 14ac0810fdda88e3e89e565759ec9d7fa65652c2 /core/Command | |
parent | fd9ebeefa2f30bb988c88648bd00cfd7c40df7ae (diff) | |
download | nextcloud-server-6c99bd00424892b3fbb9431b0ada65932aa90c33.tar.gz nextcloud-server-6c99bd00424892b3fbb9431b0ada65932aa90c33.zip |
Show disabled user count in occ user:report
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/User/Report.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/Command/User/Report.php b/core/Command/User/Report.php index fff3924d324..99676253b7f 100644 --- a/core/Command/User/Report.php +++ b/core/Command/User/Report.php @@ -27,6 +27,7 @@ namespace OC\Core\Command\User; +use OCP\IConfig; use OCP\IUserManager; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\Table; @@ -36,12 +37,15 @@ use Symfony\Component\Console\Output\OutputInterface; class Report extends Command { /** @var IUserManager */ protected $userManager; + /** @var IConfig */ + private $config; /** * @param IUserManager $userManager */ - public function __construct(IUserManager $userManager) { + public function __construct(IUserManager $userManager, IConfig $config) { $this->userManager = $userManager; + $this->config = $config; parent::__construct(); } @@ -73,6 +77,10 @@ class Report extends Command { $rows[] = [' ']; $rows[] = ['user directories', $userDirectoryCount]; + $disabledUsers = $this->config->getUsersForUserValue('core', 'enabled', 'false'); + $disabledUsersCount = count($disabledUsers); + $rows[] = ['disabled users', $disabledUsersCount]; + $table->setRows($rows); $table->render(); } |