aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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 11:46:28 +0100
commitea4eedd35a267ff64af0a9b1502ef92026467d3e (patch)
tree71d9bb05a45fc6c7afe2b79d94f69314801caf98 /lib
parent01c50d242bf0002ff14edc8aa8bee38d32111f43 (diff)
downloadnextcloud-server-ea4eedd35a267ff64af0a9b1502ef92026467d3e.tar.gz
nextcloud-server-ea4eedd35a267ff64af0a9b1502ef92026467d3e.zip
only users can have a display name different from the id
Diffstat (limited to 'lib')
-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 ddacac098c1..cd5decf6f71 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1516,8 +1516,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']);