Skip to content

Commit

Permalink
On firstlogin filetransfer
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rullzer committed Jan 31, 2020
1 parent 8b6fdaa commit 5f2c005
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Guests users can only access files shared to them and can't create any files out
<screenshot>https://raw.githubusercontent.com/nextcloud/guests/master/screenshots/settings.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/guests/master/screenshots/dropdown.png</screenshot>
<dependencies>
<nextcloud min-version="18" max-version="18" />
<nextcloud min-version="18" max-version="19" />
</dependencies>
<commands>
<command>OCA\Guests\Command\ListCommand</command>
Expand Down
5 changes: 4 additions & 1 deletion lib/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ public function handleFirstLogin(GenericEvent $event): void {
$ownershipTransferService->transfer(
$guestUser,
$user,
'/'
'/',
null,
true,
true
);
} catch (TransferOwnershipException $e) {
$this->logger->logException($e, [
Expand Down

0 comments on commit 5f2c005

Please sign in to comment.