diff options
Diffstat (limited to 'apps/user_ldap/command/showremnants.php')
-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; - } - } |