mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 23:34:22 -04:00
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
This commit is contained in:
parent
cc1577054d
commit
c5d6af3c5a
1 changed files with 6 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue