aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User
diff options
context:
space:
mode:
authorAndrew Summers <18727110+summersab@users.noreply.github.com>2023-08-29 17:30:52 -0500
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-03-15 13:14:06 +0100
commit69108321700f0cd9c471f4e1ce25ed993873f33b (patch)
treeaeab6882be6d569daa92803e74ca8b69d6b8c31c /lib/private/User
parentdf1cd1ba7e6e1f6e66a2b3229b5c082f1b81162e (diff)
downloadnextcloud-server-69108321700f0cd9c471f4e1ce25ed993873f33b.tar.gz
nextcloud-server-69108321700f0cd9c471f4e1ce25ed993873f33b.zip
Refactor `OC\Server::getCommentsManager`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
Diffstat (limited to 'lib/private/User')
-rw-r--r--lib/private/User/User.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 580c590e6eb..28dfb741be8 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -40,6 +40,7 @@ use OC\Avatar\AvatarManager;
use OC\Hooks\Emitter;
use OC_Helper;
use OCP\Accounts\IAccountManager;
+use OCP\Comments\ICommentsManager;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Group\Events\BeforeUserRemovedEvent;
use OCP\Group\Events\UserRemovedEvent;
@@ -290,8 +291,8 @@ class User implements IUser {
// Delete the user's keys in preferences
\OC::$server->getConfig()->deleteAllUserValues($this->uid);
- \OC::$server->getCommentsManager()->deleteReferencesOfActor('users', $this->uid);
- \OC::$server->getCommentsManager()->deleteReadMarksFromUser($this);
+ \OC::$server->get(ICommentsManager::class)->deleteReferencesOfActor('users', $this->uid);
+ \OC::$server->get(ICommentsManager::class)->deleteReadMarksFromUser($this);
/** @var AvatarManager $avatarManager */
$avatarManager = \OCP\Server::get(AvatarManager::class);