summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/updater.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php
index 44ebb5cd3cd..23ebc9fb811 100644
--- a/apps/files_sharing/lib/updater.php
+++ b/apps/files_sharing/lib/updater.php
@@ -112,8 +112,12 @@ class Shared_Updater {
*/
static public function shareHook($params) {
if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
- $uidOwner = \OCP\User::getUser();
- $users = \OCP\Share::getUsersItemShared($params['itemType'], $params['fileSource'], $uidOwner, true);
+ if (isset($params['uidOwner'])) {
+ $uidOwner = $params['uidOwner'];
+ } else {
+ $uidOwner = \OCP\User::getUser();
+ }
+ $users = \OCP\Share::getUsersItemShared($params['itemType'], $params['fileSource'], $uidOwner, true, false);
if (!empty($users)) {
while (!empty($users)) {
$reshareUsers = array();