From e6e0573756e23485370b28f6455caa3edecb62b3 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 18 Nov 2014 11:41:45 +0100 Subject: [PATCH] only users can have a display name different from the id --- lib/private/share/share.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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']); -- 2.39.5