summaryrefslogtreecommitdiffstats
path: root/lib/private/User/LazyUser.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/User/LazyUser.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/User/LazyUser.php')
-rw-r--r--lib/private/User/LazyUser.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/User/LazyUser.php b/lib/private/User/LazyUser.php
index 8b98b112731..30e44d57061 100644
--- a/lib/private/User/LazyUser.php
+++ b/lib/private/User/LazyUser.php
@@ -28,12 +28,10 @@ use OCP\IUserManager;
class LazyUser implements IUser {
private ?IUser $user = null;
- private DisplayNameCache $displayNameCache;
private string $uid;
private IUserManager $userManager;
- public function __construct(string $uid, DisplayNameCache $displayNameCache, IUserManager $userManager) {
- $this->displayNameCache = $displayNameCache;
+ public function __construct(string $uid, IUserManager $userManager) {
$this->uid = $uid;
$this->userManager = $userManager;
}
@@ -52,7 +50,7 @@ class LazyUser implements IUser {
}
public function getDisplayName() {
- return $this->displayNameCache->getDisplayName($this->uid);
+ return $this->userManager->getDisplayName($this->uid);
}
public function setDisplayName($displayName) {