diff options
author | Joas Schilling <coding@schilljs.com> | 2017-05-10 09:44:02 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-05-10 09:44:02 +0200 |
commit | a8bb4a18988534323d872b13a9895a2c9557b6c5 (patch) | |
tree | c3faab1a4d9a1743f032f2624f87eb06fb1a68c7 /apps/lookup_server_connector/appinfo | |
parent | d418ea550ba3e15b4ce1dbe1d0491c158f988b38 (diff) | |
download | nextcloud-server-a8bb4a18988534323d872b13a9895a2c9557b6c5.tar.gz nextcloud-server-a8bb4a18988534323d872b13a9895a2c9557b6c5.zip |
Use automatic DI injection for UpdateLookupServer
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/lookup_server_connector/appinfo')
-rw-r--r-- | apps/lookup_server_connector/appinfo/app.php | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/apps/lookup_server_connector/appinfo/app.php b/apps/lookup_server_connector/appinfo/app.php index f0d624d5f3a..28e7bea192a 100644 --- a/apps/lookup_server_connector/appinfo/app.php +++ b/apps/lookup_server_connector/appinfo/app.php @@ -22,30 +22,10 @@ $dispatcher = \OC::$server->getEventDispatcher(); $dispatcher->addListener('OC\AccountManager::userUpdated', function(\Symfony\Component\EventDispatcher\GenericEvent $event) { + /** @var \OCP\IUser $user */ $user = $event->getSubject(); - $keyManager = new \OC\Security\IdentityProof\Manager( - \OC::$server->getAppDataDir('identityproof'), - \OC::$server->getCrypto() - ); - - $config = \OC::$server->getConfig(); - $lookupServer = $config->getSystemValue('lookup_server', ''); - - $updateLookupServer = new \OCA\LookupServerConnector\UpdateLookupServer( - new \OC\Accounts\AccountManager( - \OC::$server->getDatabaseConnection(), - \OC::$server->getEventDispatcher(), - \OC::$server->getJobList() - ), - \OC::$server->getHTTPClientService(), - new \OC\Security\IdentityProof\Signer( - $keyManager, - new \OC\AppFramework\Utility\TimeFactory(), - \OC::$server->getUserManager() - ), - \OC::$server->getJobList(), - $lookupServer - ); + /** @var \OCA\LookupServerConnector\UpdateLookupServer $updateLookupServer */ + $updateLookupServer = \OC::$server->query(\OCA\LookupServerConnector\UpdateLookupServer::class); $updateLookupServer->userUpdated($user); }); |