11<?php
22
3+ declare (strict_types=1 );
4+
35/**
46 * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
57 * SPDX-License-Identifier: AGPL-3.0-or-later
810
911use Closure ;
1012use OCA \Files_External \Service \BackendService ;
11- use OCA \User_LDAP \Controller \RenewPasswordController ;
1213use OCA \User_LDAP \Events \GroupBackendRegistered ;
1314use OCA \User_LDAP \Events \UserBackendRegistered ;
1415use OCA \User_LDAP \Group_Proxy ;
3031use OCP \AppFramework \Bootstrap \IRegistrationContext ;
3132use OCP \AppFramework \IAppContainer ;
3233use OCP \AppFramework \Services \IAppConfig ;
33- use OCP \AppFramework \Services \IInitialState ;
3434use OCP \Config \IUserConfig ;
3535use OCP \EventDispatcher \IEventDispatcher ;
3636use OCP \IAvatarManager ;
3737use OCP \IConfig ;
3838use OCP \IGroupManager ;
39- use OCP \IL10N ;
4039use OCP \Image ;
41- use OCP \IRequest ;
42- use OCP \IURLGenerator ;
4340use OCP \IUserManager ;
4441use OCP \Notification \IManager as INotificationManager ;
4542use OCP \Share \IManager as IShareManager ;
@@ -53,33 +50,11 @@ class Application extends App implements IBootstrap {
5350
5451 public function __construct () {
5552 parent ::__construct (self ::APP_ID );
56- $ container = $ this ->getContainer ();
57-
58- /**
59- * Controller
60- */
61- $ container ->registerService ('RenewPasswordController ' , function (ContainerInterface $ appContainer ) {
62- return new RenewPasswordController (
63- $ appContainer ->get ('AppName ' ),
64- $ appContainer ->get (IRequest::class),
65- $ appContainer ->get (IUserManager::class),
66- $ appContainer ->get (IConfig::class),
67- $ appContainer ->get (IUserConfig::class),
68- $ appContainer ->get (IL10N ::class),
69- $ appContainer ->get ('Session ' ),
70- $ appContainer ->get (IURLGenerator::class),
71- $ appContainer ->get (IInitialState::class),
72- );
73- });
74-
75- $ container ->registerService (ILDAPWrapper::class, function (ContainerInterface $ appContainer ) {
76- return new LDAP (
77- $ appContainer ->get (IConfig::class)->getSystemValueString ('ldap_log_file ' )
78- );
79- });
8053 }
8154
8255 public function register (IRegistrationContext $ context ): void {
56+ $ context ->registerServiceAlias (ILDAPWrapper::class, LDAP ::class);
57+
8358 $ context ->registerNotifierService (Notifier::class);
8459
8560 $ context ->registerService (
0 commit comments