summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/command
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-12-20 16:33:37 +0100
committerArthur Schiwon <blizzz@owncloud.com>2014-12-20 16:33:37 +0100
commit3ca70d647a36144e64cbe4b90ffa97b3d9b64470 (patch)
tree54fc06af6ed11d28a900a96e9f778d34e83c30b4 /apps/user_ldap/command
parent144d95de7dde29cd85e795cdcd7ac1576639d641 (diff)
downloadnextcloud-server-3ca70d647a36144e64cbe4b90ffa97b3d9b64470.tar.gz
nextcloud-server-3ca70d647a36144e64cbe4b90ffa97b3d9b64470.zip
move from \OC\Preferences to \OCP\IConfig
Diffstat (limited to 'apps/user_ldap/command')
-rw-r--r--apps/user_ldap/command/showremnants.php36
1 files changed, 16 insertions, 20 deletions
diff --git a/apps/user_ldap/command/showremnants.php b/apps/user_ldap/command/showremnants.php
index fb9fc54ff6a..8144a54cbee 100644
--- a/apps/user_ldap/command/showremnants.php
+++ b/apps/user_ldap/command/showremnants.php
@@ -41,7 +41,7 @@ class ShowRemnants extends Command {
protected function execute(InputInterface $input, OutputInterface $output) {
$dui = new DeletedUsersIndex(
- new \OC\Preferences(\OC_DB::getConnection()),
+ \OC::$server->getConfig(),
\OC::$server->getDatabaseConnection(),
$this->mapper
);
@@ -52,25 +52,21 @@ class ShowRemnants extends Command {
'ownCloud name', 'Display Name', 'LDAP UID', 'LDAP DN', 'Last Login',
'Dir', 'Sharer'));
$rows = array();
- $offset = 0;
- do {
- $resultSet = $dui->getUsers($offset);
- $offset += count($resultSet);
- foreach($resultSet as $user) {
- $hAS = $user->getHasActiveShares() ? 'Y' : 'N';
- $lastLogin = ($user->getLastLogin() > 0) ?
- \OCP\Util::formatDate($user->getLastLogin()) : '-';
- $rows[] = array(
- $user->getOCName(),
- $user->getDisplayName(),
- $user->getUid(),
- $user->getDN(),
- $lastLogin,
- $user->getHomePath(),
- $hAS
- );
- }
- } while (count($resultSet) === 10);
+ $resultSet = $dui->getUsers();
+ foreach($resultSet as $user) {
+ $hAS = $user->getHasActiveShares() ? 'Y' : 'N';
+ $lastLogin = ($user->getLastLogin() > 0) ?
+ \OCP\Util::formatDate($user->getLastLogin()) : '-';
+ $rows[] = array(
+ $user->getOCName(),
+ $user->getDisplayName(),
+ $user->getUid(),
+ $user->getDN(),
+ $lastLogin,
+ $user->getHomePath(),
+ $hAS
+ );
+ }
$table->setRows($rows);
$table->render($output);