Code Duplication    Length = 9-9 lines in 2 locations

forms/ConfirmedPasswordField.php 2 locations

@@ 368-376 (lines=9) @@
365
		$value = $passwordField->Value();
366
367
		// both password-fields should be the same
368
		if($value != $passwordConfirmField->Value()) {
369
			$validator->validationError(
370
				$name,
371
				_t('Form.VALIDATIONPASSWORDSDONTMATCH',"Passwords don't match"),
372
				"validation"
373
			);
374
375
			return false;
376
		}
377
378
		if(!$this->canBeEmpty) {
379
			// both password-fields shouldn't be empty
@@ 380-388 (lines=9) @@
377
378
		if(!$this->canBeEmpty) {
379
			// both password-fields shouldn't be empty
380
			if(!$value || !$passwordConfirmField->Value()) {
381
				$validator->validationError(
382
					$name,
383
					_t('Form.VALIDATIONPASSWORDSNOTEMPTY', "Passwords can't be empty"),
384
					"validation"
385
				);
386
387
				return false;
388
			}
389
		}
390
391
		// lengths