From 5f2c00518171867b5223b9f8d438ed7345c4ed9c Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 31 Jan 2020 11:06:25 +0100 Subject: [PATCH] On firstlogin filetransfer Move the files of the guest user to the root of the target user when this is enabled on firstlogin. This avoids a separate folder that the users have to enter. Signed-off-by: Roeland Jago Douma --- appinfo/info.xml | 2 +- lib/Hooks.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 1c26d3cd..f88f1358 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -22,7 +22,7 @@ Guests users can only access files shared to them and can't create any files out https://raw.githubusercontent.com/nextcloud/guests/master/screenshots/settings.png https://raw.githubusercontent.com/nextcloud/guests/master/screenshots/dropdown.png - + OCA\Guests\Command\ListCommand diff --git a/lib/Hooks.php b/lib/Hooks.php index 10aa2801..f2e2c953 100644 --- a/lib/Hooks.php +++ b/lib/Hooks.php @@ -242,7 +242,10 @@ public function handleFirstLogin(GenericEvent $event): void { $ownershipTransferService->transfer( $guestUser, $user, - '/' + '/', + null, + true, + true ); } catch (TransferOwnershipException $e) { $this->logger->logException($e, [