diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-12-20 16:09:04 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-12-20 16:09:04 +0100 |
commit | 144d95de7dde29cd85e795cdcd7ac1576639d641 (patch) | |
tree | 67de63f5c3c43b49cbb29cffcd6eb855eff68cb1 /apps/user_ldap/command | |
parent | 4fa39250e714b3ee5aa16a5f9ce8c77daa44311b (diff) | |
download | nextcloud-server-144d95de7dde29cd85e795cdcd7ac1576639d641.tar.gz nextcloud-server-144d95de7dde29cd85e795cdcd7ac1576639d641.zip |
basic adjustments for OC 8. I.e. no visible issues, LDAP tests pass.
Diffstat (limited to 'apps/user_ldap/command')
-rw-r--r-- | apps/user_ldap/command/showremnants.php | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/apps/user_ldap/command/showremnants.php b/apps/user_ldap/command/showremnants.php index 3d39f977421..fb9fc54ff6a 100644 --- a/apps/user_ldap/command/showremnants.php +++ b/apps/user_ldap/command/showremnants.php @@ -16,9 +16,21 @@ use Symfony\Component\Console\Output\OutputInterface; use OCA\user_ldap\lib\user\DeletedUsersIndex; use OCA\User_LDAP\lib\Connection; -use OCA\User_LDAP\lib\Access; +use OCA\User_LDAP\Mapping\UserMapping; class ShowRemnants extends Command { + /** @var OCA\User_LDAP\Mapping\UserMapping */ + protected $mapping; + + /** + * @param OCA\user_ldap\User_Proxy $uBackend + * @param OCA\User_LDAP\lib\Helper $helper + * @param OCP\IConfig $config + */ + public function __construct(UserMapping $mapper) { + $this->mapper = $mapper; + parent::__construct(); + } protected function configure() { $this @@ -31,7 +43,7 @@ class ShowRemnants extends Command { $dui = new DeletedUsersIndex( new \OC\Preferences(\OC_DB::getConnection()), \OC::$server->getDatabaseConnection(), - $this->getAccess() + $this->mapper ); /** @var \Symfony\Component\Console\Helper\Table $table */ @@ -63,19 +75,4 @@ class ShowRemnants extends Command { $table->setRows($rows); $table->render($output); } - - protected function getAccess() { - $ldap = new \OCA\user_ldap\lib\LDAP(); - $dummyConnection = new Connection($ldap, '', null); - $userManager = new \OCA\user_ldap\lib\user\Manager( - \OC::$server->getConfig(), - new \OCA\user_ldap\lib\FilesystemHelper(), - new \OCA\user_ldap\lib\LogWrapper(), - \OC::$server->getAvatarManager(), - new \OCP\Image() - ); - $access = new Access($dummyConnection, $ldap, $userManager); - return $access; - } - } |