nextcloud/apps/user_ldap/appinfo/register_command.php
2014-12-20 18:28:29 +01:00

33 lines
1.2 KiB
PHP

<?php
/**
* Copyright (c) 2014 Arthur Schiwon <blizzz@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
use OCA\user_ldap\lib\Helper;
use OCA\user_ldap\lib\LDAP;
use OCA\user_ldap\User_Proxy;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\lib\User\DeletedUsersIndex;
$dbConnection = \OC::$server->getDatabaseConnection();
$userMapping = new UserMapping($dbConnection);
$helper = new Helper();
$uBackend = new User_Proxy(
$helper->getServerConfigurationPrefixes(true),
new LDAP()
);
$deletedUsersIndex = new DeletedUsersIndex(
\OC::$server->getConfig(), $dbConnection, $userMapping);
$application->add(new OCA\user_ldap\Command\ShowConfig());
$application->add(new OCA\user_ldap\Command\SetConfig());
$application->add(new OCA\user_ldap\Command\TestConfig());
$application->add(new OCA\user_ldap\Command\CreateEmptyConfig());
$application->add(new OCA\user_ldap\Command\DeleteConfig());
$application->add(new OCA\user_ldap\Command\Search());
$application->add(new OCA\user_ldap\Command\ShowRemnants($userMapping));
$application->add(new OCA\user_ldap\Command\CheckUser(
$uBackend, $helper, $deletedUsersIndex, $userMapping));