@@ -37,27 +37,27 @@ |
||
| 37 | 37 | use Symfony\Component\EventDispatcher\GenericEvent; |
| 38 | 38 | |
| 39 | 39 | class Application extends App implements IBootstrap { |
| 40 | - public const APP_ID = 'lookup_server_connector'; |
|
| 40 | + public const APP_ID = 'lookup_server_connector'; |
|
| 41 | 41 | |
| 42 | - public function __construct() { |
|
| 43 | - parent::__construct(self::APP_ID); |
|
| 44 | - } |
|
| 42 | + public function __construct() { |
|
| 43 | + parent::__construct(self::APP_ID); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - public function register(IRegistrationContext $context): void { |
|
| 47 | - } |
|
| 46 | + public function register(IRegistrationContext $context): void { |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - public function boot(IBootContext $context): void { |
|
| 50 | - /* |
|
| 49 | + public function boot(IBootContext $context): void { |
|
| 50 | + /* |
|
| 51 | 51 | * @todo move the OCP events and then move the registration to `register` |
| 52 | 52 | */ |
| 53 | - $dispatcher = $context->getServerContainer()->getEventDispatcher(); |
|
| 54 | - $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($context) { |
|
| 55 | - /** @var IUser $user */ |
|
| 56 | - $user = $event->getSubject(); |
|
| 57 | - |
|
| 58 | - /** @var UpdateLookupServer $updateLookupServer */ |
|
| 59 | - $updateLookupServer = $context->getServerContainer()->query(UpdateLookupServer::class); |
|
| 60 | - $updateLookupServer->userUpdated($user); |
|
| 61 | - }); |
|
| 62 | - } |
|
| 53 | + $dispatcher = $context->getServerContainer()->getEventDispatcher(); |
|
| 54 | + $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($context) { |
|
| 55 | + /** @var IUser $user */ |
|
| 56 | + $user = $event->getSubject(); |
|
| 57 | + |
|
| 58 | + /** @var UpdateLookupServer $updateLookupServer */ |
|
| 59 | + $updateLookupServer = $context->getServerContainer()->query(UpdateLookupServer::class); |
|
| 60 | + $updateLookupServer->userUpdated($user); |
|
| 61 | + }); |
|
| 62 | + } |
|
| 63 | 63 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | * @todo move the OCP events and then move the registration to `register` |
| 52 | 52 | */ |
| 53 | 53 | $dispatcher = $context->getServerContainer()->getEventDispatcher(); |
| 54 | - $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($context) { |
|
| 54 | + $dispatcher->addListener('OC\AccountManager::userUpdated', function(GenericEvent $event) use ($context) { |
|
| 55 | 55 | /** @var IUser $user */ |
| 56 | 56 | $user = $event->getSubject(); |
| 57 | 57 | |