Skip to content

Commit

Permalink
Merge pull request #449 from owncloud/release-0.14.0-fix-multiappdir-…
Browse files Browse the repository at this point in the history
…update

Hotfix #447
  • Loading branch information
Vincent Petry authored Aug 22, 2019
2 parents b1ca1c1 + 988185a commit aece68d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
1 change: 0 additions & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ More information is available in the [LDAP User and Group Backend documentation]
<command>OCA\User_LDAP\Command\CreateEmptyConfig</command>
<command>OCA\User_LDAP\Command\DeleteConfig</command>
<command>OCA\User_LDAP\Command\Search</command>
<command>OCA\User_LDAP\Command\CheckUser</command>
</commands>

<use-migrations>true</use-migrations>
Expand Down
42 changes: 42 additions & 0 deletions appinfo/register_command.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* @author Viktar Dubiniuk <[email protected]>
*
* @copyright Copyright (c) 2019, ownCloud GmbH.
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/

// FIXME: The command registration should be moved into info.xml once the app compatibility is bumped to OC 10.3
// see https://github.com/owncloud/user_ldap/issues/447 for details

use OCA\User_LDAP\Helper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\User_Proxy;
use OCA\User_LDAP\Mapping\UserMapping;

$dbConnection = \OC::$server->getDatabaseConnection();
$userMapping = new UserMapping($dbConnection);
$helper = new Helper();
$ocConfig = \OC::$server->getConfig();
$uBackend = new User_Proxy(
$helper->getServerConfigurationPrefixes(true),
new LDAP(),
$ocConfig
);

$application->add(new OCA\User_LDAP\Command\CheckUser(
$uBackend, $helper, $userMapping)
);

0 comments on commit aece68d

Please sign in to comment.