diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 09:31:41 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 09:31:41 +0200 |
commit | 7506cbb1c4a3f48d21c3ace6bee705aad2e1f91a (patch) | |
tree | d093c7ec4ac77b952e1731b7b93e09c7a0e2713e /core/Command | |
parent | 746e3f174fcd45ff5b6234263dc6371f9573a237 (diff) | |
download | nextcloud-server-7506cbb1c4a3f48d21c3ace6bee705aad2e1f91a.tar.gz nextcloud-server-7506cbb1c4a3f48d21c3ace6bee705aad2e1f91a.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 b7fecee61bb..66bc9bd3de1 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(); return 0; |