diff options
author | Robin Appelman <robin@icewind.nl> | 2022-05-17 15:20:28 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-05-18 03:47:34 +0200 |
commit | 6d6662ec68c8e15c4c6bfdf1c694794badd412d7 (patch) | |
tree | be5fef3090aaadad183cf68b09694daf09c0e65b /lib/private/User/LazyUser.php | |
parent | 83f831c26382c648d759384b8c14cac2edc67fa4 (diff) | |
download | nextcloud-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.php | 6 |
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) { |