aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/AppInfo/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/AppInfo/Application.php')
-rw-r--r--apps/user_ldap/lib/AppInfo/Application.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/user_ldap/lib/AppInfo/Application.php b/apps/user_ldap/lib/AppInfo/Application.php
index 400315442bb..70b7920f7ab 100644
--- a/apps/user_ldap/lib/AppInfo/Application.php
+++ b/apps/user_ldap/lib/AppInfo/Application.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -10,7 +11,6 @@ use OCA\Files_External\Service\BackendService;
use OCA\User_LDAP\Controller\RenewPasswordController;
use OCA\User_LDAP\Events\GroupBackendRegistered;
use OCA\User_LDAP\Events\UserBackendRegistered;
-use OCA\User_LDAP\FilesystemHelper;
use OCA\User_LDAP\Group_Proxy;
use OCA\User_LDAP\GroupPluginManager;
use OCA\User_LDAP\Handler\ExtStorageConfigHandler;
@@ -40,6 +40,7 @@ use OCP\IUserManager;
use OCP\Notification\IManager as INotificationManager;
use OCP\Share\IManager as IShareManager;
use OCP\User\Events\PostLoginEvent;
+use OCP\Util;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
@@ -84,7 +85,6 @@ class Application extends App implements IBootstrap {
function (ContainerInterface $c) {
return new Manager(
$c->get(IConfig::class),
- $c->get(FilesystemHelper::class),
$c->get(LoggerInterface::class),
$c->get(IAvatarManager::class),
$c->get(Image::class),
@@ -106,17 +106,18 @@ class Application extends App implements IBootstrap {
INotificationManager $notificationManager,
IAppContainer $appContainer,
IEventDispatcher $dispatcher,
+ IUserManager $userManager,
IGroupManager $groupManager,
User_Proxy $userBackend,
Group_Proxy $groupBackend,
- Helper $helper
- ) {
+ Helper $helper,
+ ): void {
$configPrefixes = $helper->getServerConfigurationPrefixes(true);
if (count($configPrefixes) > 0) {
$userPluginManager = $appContainer->get(UserPluginManager::class);
$groupPluginManager = $appContainer->get(GroupPluginManager::class);
- \OC_User::useBackend($userBackend);
+ $userManager->registerBackend($userBackend);
$groupManager->addBackend($groupBackend);
$userBackendRegisteredEvent = new UserBackendRegistered($userBackend, $userPluginManager);
@@ -129,7 +130,7 @@ class Application extends App implements IBootstrap {
$context->injectFn(Closure::fromCallable([$this, 'registerBackendDependents']));
- \OCP\Util::connectHook(
+ Util::connectHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
'\OCA\User_LDAP\Helper',
@@ -140,7 +141,7 @@ class Application extends App implements IBootstrap {
private function registerBackendDependents(IAppContainer $appContainer, IEventDispatcher $dispatcher): void {
$dispatcher->addListener(
'OCA\\Files_External::loadAdditionalBackends',
- function () use ($appContainer) {
+ function () use ($appContainer): void {
$storagesBackendService = $appContainer->get(BackendService::class);
$storagesBackendService->registerConfigHandler('home', function () use ($appContainer) {
return $appContainer->get(ExtStorageConfigHandler::class);