Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prevent transferring data to user which never loggedin
Signed-off-by: Tobia De Koninck <[email protected]>
  • Loading branch information
LEDfan committed Jan 3, 2020
commit 9c42e85f91b15797256a10156d83569cdd9cbaec
2 changes: 1 addition & 1 deletion apps/files/lib/Service/OwnershipTransferService.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function transfer(IUser $sourceUser,
$sourcePath = rtrim($sourceUid . '/files/' . $path, '/');

// target user has to be ready
if (!$this->encryptionManager->isReadyForUser($destinationUid)) {
if ($destinationUser->getLastLogin() === 0 || !$this->encryptionManager->isReadyForUser($destinationUid)) {
throw new TransferOwnershipException("The target user is not ready to accept files. The user has at least to have logged in once.", 2);
}

Expand Down