summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-07-03 11:31:25 +0200
committerJulius Härtl <jus@bitgrid.net>2019-07-03 21:34:18 +0200
commit857fae288caffe25ecb9d691dfbea74f4b041339 (patch)
tree046ab1842feff254c02a5f498d03eb510dfcf778 /lib
parentc5c14d09b190d3e8e1fe5e8e6aff7e95b0ac6f20 (diff)
downloadnextcloud-server-857fae288caffe25ecb9d691dfbea74f4b041339.tar.gz
nextcloud-server-857fae288caffe25ecb9d691dfbea74f4b041339.zip
Always set the display name for user shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 59aefd54cde..aea50dfcdb6 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -940,6 +940,10 @@ class DefaultShareProvider implements IShareProvider {
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
$share->setSharedWith($data['share_with']);
+ $user = $this->userManager->get($data['share_with']);
+ if ($user !== null) {
+ $share->setSharedWithDisplayName($user->getDisplayName());
+ }
} else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_GROUP) {
$share->setSharedWith($data['share_with']);
} else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) {