Skip to content

Commit

Permalink
only users can have a display name different from the id
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjoern Schiessle committed Nov 18, 2014
1 parent fcde4c7 commit e6e0573
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/private/share/share.php
Original file line number Diff line number Diff line change
Expand Up @@ -1462,8 +1462,11 @@ public static function getItems($itemType, $item = null, $shareType = null, $sha
$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']);
Expand Down

0 comments on commit e6e0573

Please sign in to comment.