summaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration/Collaborators/UserPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Collaboration/Collaborators/UserPlugin.php')
-rw-r--r--lib/private/Collaboration/Collaborators/UserPlugin.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php
index 2096ec4621e..f3c2a4019c3 100644
--- a/lib/private/Collaboration/Collaborators/UserPlugin.php
+++ b/lib/private/Collaboration/Collaborators/UserPlugin.php
@@ -126,6 +126,7 @@ class UserPlugin implements ISearchPlugin {
'shareType' => Share::SHARE_TYPE_USER,
'shareWith' => $uid,
],
+ 'shareWithDisplayNameUnique' => !empty($userEmail) ? $userEmail : $uid,
];
} else {
$addToWideResults = false;
@@ -147,6 +148,7 @@ class UserPlugin implements ISearchPlugin {
'shareType' => IShare::TYPE_USER,
'shareWith' => $uid,
],
+ 'shareWithDisplayNameUnique' => !empty($userEmail) ? $userEmail : $uid,
];
}
}
@@ -166,12 +168,15 @@ class UserPlugin implements ISearchPlugin {
}
if ($addUser) {
+ $uid = $user->getUID();
+ $userEmail = $user->getEMailAddress();
$result['exact'][] = [
'label' => $user->getDisplayName(),
'value' => [
'shareType' => Share::SHARE_TYPE_USER,
'shareWith' => $user->getUID(),
],
+ 'shareWithDisplayNameUnique' => $userEmail !== null && $userEmail !== '' ? $userEmail : $uid,
];
}
}