summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-05-17 15:20:28 +0200
committerRobin Appelman <robin@icewind.nl>2022-05-18 03:47:34 +0200
commit6d6662ec68c8e15c4c6bfdf1c694794badd412d7 (patch)
treebe5fef3090aaadad183cf68b09694daf09c0e65b /lib/private/Server.php
parent83f831c26382c648d759384b8c14cac2edc67fa4 (diff)
downloadnextcloud-server-6d6662ec68c8e15c4c6bfdf1c694794badd412d7.tar.gz
nextcloud-server-6d6662ec68c8e15c4c6bfdf1c694794badd412d7.zip
expose displayname cache trough a public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 6e6fa430489..cc855eb0304 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -151,6 +151,7 @@ use OC\SystemTag\ManagerFactory as SystemTagManagerFactory;
use OC\Tagging\TagMapper;
use OC\Talk\Broker;
use OC\Template\JSCombiner;
+use OC\User\DisplayNameCache;
use OCA\Theming\ImageManager;
use OCA\Theming\ThemingDefaults;
use OCA\Theming\Util;
@@ -472,6 +473,10 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class);
$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
+ $this->registerService(DisplayNameCache::class, function (ContainerInterface $c) {
+ return $c->get(\OC\User\Manager::class)->getDisplayNameCache();
+ });
+
$this->registerService(\OCP\IGroupManager::class, function (ContainerInterface $c) {
$groupManager = new \OC\Group\Manager(
$this->get(IUserManager::class),