diff --git a/typo3/sysext/setup/Classes/Controller/SetupModuleController.php b/typo3/sysext/setup/Classes/Controller/SetupModuleController.php index fab519c521aa..0f485d815a59 100644 --- a/typo3/sysext/setup/Classes/Controller/SetupModuleController.php +++ b/typo3/sysext/setup/Classes/Controller/SetupModuleController.php @@ -436,18 +436,25 @@ protected function renderUserSetup(): array $value = ''; $noAutocomplete = 'autocomplete="new-password" '; } + + $addPasswordRequirementsDescription = false; + if ($fieldName === 'password' && $this->passwordPolicyValidator->isEnabled() && $this->passwordPolicyValidator->hasRequirements()) { + $addPasswordRequirementsDescription = true; + } + $html = ''; - if ($fieldName === 'password' && $this->passwordPolicyValidator->isEnabled() && $this->passwordPolicyValidator->hasRequirements()) { + if ($addPasswordRequirementsDescription) { $description = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_password_policy.xlf:passwordRequirements.description'); - $html .= '

' . htmlspecialchars($description) . '

'; - $html .= ''; + $html .= '

' . htmlspecialchars($description) . '

'; + $html .= '
'; } break;