aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/command/transferownership.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/command/transferownership.php')
-rw-r--r--apps/files/command/transferownership.php6
1 files changed, 6 insertions, 0 deletions
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("<error>Unknown destination user $this->destinationUser</error>");
return;
}
+
+ // target user has to be ready
+ if (!\OC::$server->getEncryptionManager()->isReadyForUser($this->destinationUser)) {
+ $output->writeln("<error>The target user is not ready to accept files. The user has at least to be logged in once.</error>");
+ return;
+ }
$date = date('c');
$this->finalTarget = "$this->destinationUser/files/transferred from $this->sourceUser on $date";