aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-08-04 10:39:57 +0200
committerGitHub <noreply@github.com>2023-08-04 10:39:57 +0200
commit44b4c16a091592203df51c19d0be1b520bc3ad9b (patch)
tree25ee31ab54832dc2bc984f4f91940c30dcb8ac33 /apps/dav
parentf8bd676154f988ef2130ccb0e29b0cc95e42a204 (diff)
parent3962cd0aa8ab7530deffa3b41cab2e11a01fd14a (diff)
downloadnextcloud-server-44b4c16a091592203df51c19d0be1b520bc3ad9b.tar.gz
nextcloud-server-44b4c16a091592203df51c19d0be1b520bc3ad9b.zip
Merge pull request #39605 from nextcloud/bugfix/noid/final-events-cleanup
fix!: Final round of moving to IEventDispatcher
Diffstat (limited to 'apps/dav')
-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());
});