Code Duplication    Length = 8-11 lines in 2 locations

lib/private/User/Manager.php 2 locations

@@ 202-209 (lines=8) @@
199
		$loginName = str_replace("\0", '', $loginName);
200
		$password = str_replace("\0", '', $password);
201
202
		foreach ($this->backends as $backend) {
203
			if ($backend->implementsActions(Backend::CHECK_PASSWORD)) {
204
				$uid = $backend->checkPassword($loginName, $password);
205
				if ($uid !== false) {
206
					return $this->getUserObject($uid, $backend);
207
				}
208
			}
209
		}
210
211
		return false;
212
	}
@@ 280-290 (lines=11) @@
277
	 */
278
	public function createUser($uid, $password) {
279
		$localBackends = [];
280
		foreach ($this->backends as $backend) {
281
			if ($backend instanceof Database) {
282
				// First check if there is another user backend
283
				$localBackends[] = $backend;
284
				continue;
285
			}
286
287
			if ($backend->implementsActions(Backend::CREATE_USER)) {
288
				return $this->createUserFromBackend($uid, $password, $backend);
289
			}
290
		}
291
292
		foreach ($localBackends as $backend) {
293
			if ($backend->implementsActions(Backend::CREATE_USER)) {