diff options
author | Joas Schilling <coding@schilljs.com> | 2023-07-27 19:57:10 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-07-28 14:11:19 +0200 |
commit | 68fc9b48c24bf810488c5910da2feadd10587e51 (patch) | |
tree | cf183d9afa8f2fa5a9342341f4cf21d51bc6ad50 /apps/dav/lib/AppInfo | |
parent | 9bf812ac6c29f7722ba6db876dbabbc1b065dce1 (diff) | |
download | nextcloud-server-68fc9b48c24bf810488c5910da2feadd10587e51.tar.gz nextcloud-server-68fc9b48c24bf810488c5910da2feadd10587e51.zip |
feat!: Migrate AccountManager event to typed event
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/lib/AppInfo')
-rw-r--r-- | apps/dav/lib/AppInfo/Application.php | 12 |
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()); }); |