diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-04-22 10:01:35 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-04-22 10:29:18 +0200 |
commit | ed4c1e584f685d18f77b5eca95e3a82826e8be5d (patch) | |
tree | a60e4324d2ac501dc4667a1dcadcbbca7e899442 /apps/files_sharing | |
parent | 4333c215cbc444f13fd07542a143e75f82609ac4 (diff) | |
download | nextcloud-server-ed4c1e584f685d18f77b5eca95e3a82826e8be5d.tar.gz nextcloud-server-ed4c1e584f685d18f77b5eca95e3a82826e8be5d.zip |
Update cache when display name change
This improve the correctness of the data
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/lib/Cache.php | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index befd1532d02..2539247b561 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -30,6 +30,7 @@ namespace OCA\Files_Sharing\AppInfo; use OC\Share\Share; +use OC\User\DisplayNameCache; use OCA\Files_Sharing\Capabilities; use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent; use OCA\Files_Sharing\External\Manager; @@ -65,6 +66,7 @@ use OCP\IUserSession; use OCP\L10N\IFactory; use OCP\Share\Events\ShareCreatedEvent; use OCP\Share\IManager; +use OCP\User\Events\UserChangedEvent; use OCP\Util; use Psr\Container\ContainerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -98,6 +100,7 @@ class Application extends App implements IBootstrap { $context->registerCapability(Capabilities::class); $context->registerNotifierService(Notifier::class); + $context->registerEventListener(UserChangedEvent::class, DisplayNameCache::class); } public function boot(IBootContext $context): void { diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php index 7290c33da94..9f11431008f 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -53,7 +53,7 @@ class Cache extends CacheJail { private ICacheEntry $sourceRootInfo; private bool $rootUnchanged = true; private ?string $ownerDisplayName = null; - private int $numericId; + private $numericId; private DisplayNameCache $displayNameCache; /** |