aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/AppInfo/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/AppInfo/Application.php')
-rw-r--r--apps/dav/lib/AppInfo/Application.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php
index 4ed68e68840..9b185963dcc 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -69,6 +69,7 @@ use OCA\DAV\Events\CardDeletedEvent;
use OCA\DAV\Events\CardUpdatedEvent;
use OCA\DAV\Events\SubscriptionCreatedEvent;
use OCA\DAV\Events\SubscriptionDeletedEvent;
+use OCP\Accounts\UserUpdatedEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\Events\TrustedServerRemovedEvent;
use OCA\DAV\HookManager;
@@ -224,13 +225,10 @@ class Application extends App implements IBootstrap {
}
});
- $dispatcher->addListener('OC\AccountManager::userUpdated', function ($event) use ($container) {
- if ($event instanceof GenericEvent) {
- $user = $event->getSubject();
- /** @var SyncService $syncService */
- $syncService = $container->query(SyncService::class);
- $syncService->updateUser($user);
- }
+ $dispatcher->addListener(UserUpdatedEvent::class, function (UserUpdatedEvent $event) use ($container) {
+ /** @var SyncService $syncService */
+ $syncService = \OCP\Server::get(SyncService::class);
+ $syncService->updateUser($event->getUser());
});