summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-11 21:17:22 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-12 10:45:33 +0100
commit0a33cdee0cbd7b76180e18e50db8ce8938086789 (patch)
treed03b770f955f680e86f51dbb39ddaf856cb12403
parentf8607ac1327f3254f6f4fe86c8418f1b3d447730 (diff)
downloadnextcloud-server-0a33cdee0cbd7b76180e18e50db8ce8938086789.tar.gz
nextcloud-server-0a33cdee0cbd7b76180e18e50db8ce8938086789.zip
If the initiator no longer exists return UID
It can happen that the share initiator is deleted. Because of the new resharing behaviour this share then still exists. We just can fetch the displayname properly.
-rw-r--r--apps/files_sharing/api/share20ocs.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/api/share20ocs.php b/apps/files_sharing/api/share20ocs.php
index 67a94aaf8aa..993a069fe64 100644
--- a/apps/files_sharing/api/share20ocs.php
+++ b/apps/files_sharing/api/share20ocs.php
@@ -91,7 +91,7 @@ class Share20OCS {
'id' => $share->getId(),
'share_type' => $share->getShareType(),
'uid_owner' => $share->getSharedBy(),
- 'displayname_owner' => $sharedBy->getDisplayName(),
+ 'displayname_owner' => $sharedBy !== null ? $sharedBy->getDisplayName() : $share->getSharedBy(),
'permissions' => $share->getPermissions(),
'stime' => $share->getShareTime()->getTimestamp(),
'parent' => null,