Skip to content
Snippets Groups Projects
Unverified Commit 97508f69 authored by Tobia De Koninck's avatar Tobia De Koninck Committed by Roeland Jago Douma
Browse files

Prevent transferring data to user which never loggedin

parent 7c56144f
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment