Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sharebymail/lib/Activity.php')
-rw-r--r--apps/sharebymail/lib/Activity.php22
1 files changed, 1 insertions, 21 deletions
diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php
index 3992f0f942b..3693455dda4 100644
--- a/apps/sharebymail/lib/Activity.php
+++ b/apps/sharebymail/lib/Activity.php
@@ -55,9 +55,6 @@ class Activity implements IProvider {
protected $contactsManager;
/** @var array */
- protected $displayNames = [];
-
- /** @var array */
protected $contactNames = [];
public const SUBJECT_SHARED_EMAIL_SELF = 'shared_with_email_self';
@@ -346,14 +343,10 @@ class Activity implements IProvider {
* @return array
*/
protected function generateUserParameter($uid) {
- if (!isset($this->displayNames[$uid])) {
- $this->displayNames[$uid] = $this->getDisplayName($uid);
- }
-
return [
'type' => 'user',
'id' => $uid,
- 'name' => $this->displayNames[$uid],
+ 'name' => $this->userManager->getDisplayName($uid) ?? $uid,
];
}
@@ -381,17 +374,4 @@ class Activity implements IProvider {
return $email;
}
-
- /**
- * @param string $uid
- * @return string
- */
- protected function getDisplayName($uid) {
- $user = $this->userManager->get($uid);
- if ($user instanceof IUser) {
- return $user->getDisplayName();
- } else {
- return $uid;
- }
- }
}