Code Duplication    Length = 8-11 lines in 2 locations

lib/private/User/Manager.php 2 locations

@@ 210-217 (lines=8) @@
207
		$loginName = str_replace("\0", '', $loginName);
208
		$password = str_replace("\0", '', $password);
209
210
		foreach ($this->backends as $backend) {
211
			if ($backend->implementsActions(Backend::CHECK_PASSWORD)) {
212
				$uid = $backend->checkPassword($loginName, $password);
213
				if ($uid !== false) {
214
					return $this->getUserObject($uid, $backend);
215
				}
216
			}
217
		}
218
219
		return false;
220
	}
@@ 288-298 (lines=11) @@
285
	 */
286
	public function createUser($uid, $password) {
287
		$localBackends = [];
288
		foreach ($this->backends as $backend) {
289
			if ($backend instanceof Database) {
290
				// First check if there is another user backend
291
				$localBackends[] = $backend;
292
				continue;
293
			}
294
295
			if ($backend->implementsActions(Backend::CREATE_USER)) {
296
				return $this->createUserFromBackend($uid, $password, $backend);
297
			}
298
		}
299
300
		foreach ($localBackends as $backend) {
301
			if ($backend->implementsActions(Backend::CREATE_USER)) {