summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-11-18 11:41:45 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2014-11-18 17:29:00 +0100
commite6e0573756e23485370b28f6455caa3edecb62b3 (patch)
treeaa6eaccde573b89c7912b2eed45ae15fa6d28b82 /lib/private
parentfcde4c70a26c0149ca1c62958bae11e2cbec35ee (diff)
downloadnextcloud-server-e6e0573756e23485370b28f6455caa3edecb62b3.tar.gz
nextcloud-server-e6e0573756e23485370b28f6455caa3edecb62b3.zip
only users can have a display name different from the id
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/share/share.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 07c2641644d..b637b87b5eb 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1462,8 +1462,11 @@ class Share extends \OC\Share\Constants {
$row['permissions'] &= ~\OCP\PERMISSION_SHARE;
}
// Add display names to result
- if ( isset($row['share_with']) && $row['share_with'] != '') {
+ if ( isset($row['share_with']) && $row['share_with'] != '' &&
+ isset($row['share_with']) && $row['share_type'] === self::SHARE_TYPE_USER) {
$row['share_with_displayname'] = \OCP\User::getDisplayName($row['share_with']);
+ } else {
+ $row['share_with_displayname'] = $row['share_with'];
}
if ( isset($row['uid_owner']) && $row['uid_owner'] != '') {
$row['displayname_owner'] = \OCP\User::getDisplayName($row['uid_owner']);