Code Duplication    Length = 13-14 lines in 2 locations

core/Command/Encryption/ChangeKeyStorageRoot.php 1 location

@@ 195-207 (lines=13) @@
192
		$progress->start();
193
194
195
		foreach($this->userManager->getBackends() as $backend) {
196
			$limit = 500;
197
			$offset = 0;
198
			do {
199
				$users = $backend->getUsers('', $limit, $offset);
200
				foreach ($users as $user) {
201
					$progress->advance();
202
					$this->setupUserFS($user);
203
					$this->moveUserEncryptionFolder($user, $oldRoot, $newRoot);
204
				}
205
				$offset += $limit;
206
			} while(count($users) >= $limit);
207
		}
208
		$progress->finish();
209
	}
210

lib/private/Encryption/DecryptAll.php 1 location

@@ 166-179 (lines=14) @@
163
			$fetchUsersProgress->setMessage("Fetch list of users...");
164
			$fetchUsersProgress->advance();
165
166
			foreach ($this->userManager->getBackends() as $backend) {
167
				$limit = 500;
168
				$offset = 0;
169
				do {
170
					$users = $backend->getUsers('', $limit, $offset);
171
					foreach ($users as $user) {
172
						$userList[] = $user;
173
					}
174
					$offset += $limit;
175
					$fetchUsersProgress->advance();
176
				} while (count($users) >= $limit);
177
				$fetchUsersProgress->setMessage("Fetch list of users... finished");
178
				$fetchUsersProgress->finish();
179
			}
180
		} else {
181
			$userList[] = $user;
182
		}