Merge pull request #13954 from owncloud/fix-enc-mig-user-retrieval
Fix enc mig user retrieval
This commit is contained in:
commit
b4b45a1a52
|
@ -62,11 +62,17 @@ class MigrateKeys extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
$output->writeln("Migrating keys for users on backend <info>$name</info>");
|
$output->writeln("Migrating keys for users on backend <info>$name</info>");
|
||||||
$users = $backend->getUsers();
|
|
||||||
|
$limit = 500;
|
||||||
|
$offset = 0;
|
||||||
|
do {
|
||||||
|
$users = $backend->getUsers('', $limit, $offset);
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
$output->writeln(" <info>$user</info>");
|
$output->writeln(" <info>$user</info>");
|
||||||
$migration->reorganizeFolderStructureForUser($user);
|
$migration->reorganizeFolderStructureForUser($user);
|
||||||
}
|
}
|
||||||
|
$offset += $limit;
|
||||||
|
} while(count($users) >= $limit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,10 +42,15 @@ class Migration {
|
||||||
public function reorganizeFolderStructure() {
|
public function reorganizeFolderStructure() {
|
||||||
$this->reorganizeSystemFolderStructure();
|
$this->reorganizeSystemFolderStructure();
|
||||||
|
|
||||||
$users = \OCP\User::getUsers();
|
$limit = 500;
|
||||||
|
$offset = 0;
|
||||||
|
do {
|
||||||
|
$users = \OCP\User::getUsers('', $limit, $offset);
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
$this->reorganizeFolderStructureForUser($user);
|
$this->reorganizeFolderStructureForUser($user);
|
||||||
}
|
}
|
||||||
|
$offset += $limit;
|
||||||
|
} while(count($users) >= $limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function reorganizeSystemFolderStructure() {
|
public function reorganizeSystemFolderStructure() {
|
||||||
|
|
Loading…
Reference in New Issue