summaryrefslogtreecommitdiffstats
path: root/lib/private/comments
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-12-03 16:35:57 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-12-09 14:34:23 +0100
commite3dbc3d40ccd9874dadb32b59633cb159afddc48 (patch)
tree84495c8990e907cde07185c716afba91fc54a517 /lib/private/comments
parent2ce2de0ae523e91b90c39a91fdcc975f06a7674a (diff)
downloadnextcloud-server-e3dbc3d40ccd9874dadb32b59633cb159afddc48.tar.gz
nextcloud-server-e3dbc3d40ccd9874dadb32b59633cb159afddc48.zip
different strategy in cleaning up after user was deleted
we do not listen to deletion hooks anymore, because there is no guarantee that they will be heard - requires that something fetches the CommentsManager first. Instead, in the user deletion routine the clean up method will be called directly. Same way as it happens for files, group memberships, config values.
Diffstat (limited to 'lib/private/comments')
-rw-r--r--lib/private/comments/manager.php5
-rw-r--r--lib/private/comments/managerfactory.php1
2 files changed, 0 insertions, 6 deletions
diff --git a/lib/private/comments/manager.php b/lib/private/comments/manager.php
index 78b2b71c8dd..bb0782c77fd 100644
--- a/lib/private/comments/manager.php
+++ b/lib/private/comments/manager.php
@@ -23,15 +23,10 @@ class Manager implements ICommentsManager {
public function __construct(
IDBConnection $dbConn,
- Emitter $userManager,
ILogger $logger
) {
$this->dbConn = $dbConn;
$this->logger = $logger;
- $userManager->listen('\OC\User', 'postDelete', function($user) {
- /** @var \OCP\IUser $user */
- $this->deleteReferencesOfActor('user', $user->getUid());
- });
}
/**
diff --git a/lib/private/comments/managerfactory.php b/lib/private/comments/managerfactory.php
index 71d73571b10..0c9fce3e640 100644
--- a/lib/private/comments/managerfactory.php
+++ b/lib/private/comments/managerfactory.php
@@ -17,7 +17,6 @@ class ManagerFactory implements ICommentsManagerFactory {
public function getManager() {
return new Manager(
\oc::$server->getDatabaseConnection(),
- \oc::$server->getUserManager(),
\oc::$server->getLogger()
);
}