From 50e20e531ea942d900c50b510c8c13a6a1dd1465 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Thu, 14 Apr 2016 17:32:25 +0200 Subject: Introduce isReadyForUser and verify in file transfer ownership - fixes #23786 --- apps/files/command/transferownership.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/files') diff --git a/apps/files/command/transferownership.php b/apps/files/command/transferownership.php index 6bf2fae6bdf..1f46efdde0d 100644 --- a/apps/files/command/transferownership.php +++ b/apps/files/command/transferownership.php @@ -97,6 +97,12 @@ class TransferOwnership extends Command { $output->writeln("Unknown destination user $this->destinationUser"); return; } + + // target user has to be ready + if (!\OC::$server->getEncryptionManager()->isReadyForUser($this->destinationUser)) { + $output->writeln("The target user is not ready to accept files. The user has at least to be logged in once."); + return; + } $date = date('c'); $this->finalTarget = "$this->destinationUser/files/transferred from $this->sourceUser on $date"; -- cgit v1.2.3