diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-05 17:25:01 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-05 17:25:01 +0100 |
commit | ace1d40ed69e464b58cc39cc1924fb43b9f2722a (patch) | |
tree | 4c8adc250775fc2ec897eb47ce1948d9ee271f1b | |
parent | 737b9a990f73ffe362cbe03b2878f8a633414336 (diff) | |
download | nextcloud-server-ace1d40ed69e464b58cc39cc1924fb43b9f2722a.tar.gz nextcloud-server-ace1d40ed69e464b58cc39cc1924fb43b9f2722a.zip |
get owner from share item, if we expire a share while the user updates his /Shared folder than the owner is different from the currently logged in user
-rw-r--r-- | apps/files_sharing/lib/updater.php | 8 |
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(); |