summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/command/showremnants.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-01-06 17:50:06 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-01-06 17:50:06 +0100
commite724b78694cb17c7a3ff4427ae103b01baa4688c (patch)
tree21ad2d4a24d1e4e3a8da5e5d0ee6f1dd8ff40cf1 /apps/user_ldap/command/showremnants.php
parent61ed363f820a3b25b68289ed2c03ff5e5edfed91 (diff)
downloadnextcloud-server-e724b78694cb17c7a3ff4427ae103b01baa4688c.tar.gz
nextcloud-server-e724b78694cb17c7a3ff4427ae103b01baa4688c.zip
smaller fixes: coding style, PHPdoc, typos and few for DI
Diffstat (limited to 'apps/user_ldap/command/showremnants.php')
-rw-r--r--apps/user_ldap/command/showremnants.php25
1 files changed, 11 insertions, 14 deletions
diff --git a/apps/user_ldap/command/showremnants.php b/apps/user_ldap/command/showremnants.php
index 8144a54cbee..ab78cee96e7 100644
--- a/apps/user_ldap/command/showremnants.php
+++ b/apps/user_ldap/command/showremnants.php
@@ -19,16 +19,14 @@ use OCA\User_LDAP\lib\Connection;
use OCA\User_LDAP\Mapping\UserMapping;
class ShowRemnants extends Command {
- /** @var OCA\User_LDAP\Mapping\UserMapping */
- protected $mapping;
+ /** @var use OCA\User_LDAP\lib\User\DeletedUsersIndex; */
+ protected $dui;
/**
- * @param OCA\user_ldap\User_Proxy $uBackend
- * @param OCA\User_LDAP\lib\Helper $helper
- * @param OCP\IConfig $config
+ * @param OCA\user_ldap\lib\user\DeletedUsersIndex $dui
*/
- public function __construct(UserMapping $mapper) {
- $this->mapper = $mapper;
+ public function __construct(DeletedUsersIndex $dui) {
+ $this->dui = $dui;
parent::__construct();
}
@@ -39,20 +37,19 @@ class ShowRemnants extends Command {
;
}
+ /**
+ * executes the command, i.e. creeates and outputs a table of LDAP users marked as deleted
+ *
+ * {@inheritdoc}
+ */
protected function execute(InputInterface $input, OutputInterface $output) {
- $dui = new DeletedUsersIndex(
- \OC::$server->getConfig(),
- \OC::$server->getDatabaseConnection(),
- $this->mapper
- );
-
/** @var \Symfony\Component\Console\Helper\Table $table */
$table = $this->getHelperSet()->get('table');
$table->setHeaders(array(
'ownCloud name', 'Display Name', 'LDAP UID', 'LDAP DN', 'Last Login',
'Dir', 'Sharer'));
$rows = array();
- $resultSet = $dui->getUsers();
+ $resultSet = $this->dui->getUsers();
foreach($resultSet as $user) {
$hAS = $user->getHasActiveShares() ? 'Y' : 'N';
$lastLogin = ($user->getLastLogin() > 0) ?