aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-07-25 21:45:07 +0200
committerJoas Schilling <coding@schilljs.com>2023-07-27 23:13:37 +0200
commitad12a740cb619d701de332eedda91dcbb1f53047 (patch)
tree3bb0fcd87424e72ca0f259e94232c361e7e695c1 /lib/private/Collaboration
parentb93f101d6209905d22b90816bf6a0cfe89a38a8b (diff)
downloadnextcloud-server-ad12a740cb619d701de332eedda91dcbb1f53047.tar.gz
nextcloud-server-ad12a740cb619d701de332eedda91dcbb1f53047.zip
fix!: Remove symfony EventDispatcherInterface from User
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Collaboration')
-rw-r--r--lib/private/Collaboration/Resources/Listener.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Collaboration/Resources/Listener.php b/lib/private/Collaboration/Resources/Listener.php
index d3b2f012a29..2263f5d3b1a 100644
--- a/lib/private/Collaboration/Resources/Listener.php
+++ b/lib/private/Collaboration/Resources/Listener.php
@@ -32,6 +32,7 @@ use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IGroup;
use OCP\IUser;
+use OCP\User\Events\UserDeletedEvent;
use Symfony\Component\EventDispatcher\GenericEvent;
class Listener {
@@ -47,9 +48,8 @@ class Listener {
$symfonyDispatcher->addListener(IGroup::class . '::postAddUser', $listener);
$symfonyDispatcher->addListener(IGroup::class . '::postRemoveUser', $listener);
- $symfonyDispatcher->addListener(IUser::class . '::postDelete', function (GenericEvent $event) {
- /** @var IUser $user */
- $user = $event->getSubject();
+ $eventDispatcher->addListener(UserDeletedEvent::class, function (UserDeletedEvent $event) {
+ $user = $event->getUser();
/** @var IManager $resourceManager */
$resourceManager = \OCP\Server::get(IManager::class);