-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #449 from owncloud/release-0.14.0-fix-multiappdir-…
…update Hotfix #447
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
); |