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.
This commit is contained in:
Roeland Jago Douma 2016-02-11 21:17:22 +01:00
parent f8607ac132
commit 0a33cdee0c
1 changed files with 1 additions and 1 deletions

View File

@ -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,