Browse Source

Prevent transferring data to user which never loggedin

Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
tags/v19.0.0beta1
Tobia De Koninck 4 years ago
parent
commit
97508f69ec
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      apps/files/lib/Service/OwnershipTransferService.php

+ 1
- 1
apps/files/lib/Service/OwnershipTransferService.php View File

@@ -87,7 +87,7 @@ class OwnershipTransferService {
$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);
}


Loading…
Cancel
Save