324 : Section {
325 $ff = $this->ui_factory->input()->field();
326
327 return $ff->section(
328 [
329 'password_change_on_first_login_enabled' => $ff->checkbox(
330 $this->lng->txt('ps_password_change_on_first_login_enabled'),
331 $this->lng->txt('ps_password_change_on_first_login_enabled_info')
332 )->withValue($security_settings->isPasswordChangeOnFirstLoginEnabled()),
333 'password_must_not_contain_loginame' => $ff->checkbox(
334 $this->lng->txt('ps_password_must_not_contain_loginame'),
335 $this->lng->txt('ps_password_must_not_contain_loginame_info')
336 )->withValue($security_settings->getPasswordMustNotContainLoginnameStatus()),
337 'password_chars_and_numbers_enabled' => $ff->checkbox(
338 $this->lng->txt('ps_password_chars_and_numbers_enabled'),
339 $this->lng->txt('ps_password_chars_and_numbers_enabled_info')
340 )->withValue($security_settings->isPasswordCharsAndNumbersEnabled()),
341 'password_special_chars_enabled' => $ff->checkbox(
342 $this->lng->txt('ps_password_special_chars_enabled'),
343 $this->lng->txt('ps_password_special_chars_enabled_info')
344 )->withValue($security_settings->isPasswordSpecialCharsEnabled()),
345 'password_min_length' => $ff->numeric(
346 $this->lng->txt('ps_password_min_length'),
347 $this->lng->txt('ps_password_min_length_info')
348 )->withRequired(true)
349 ->withAdditionalTransformation($this->refinery->int()->isGreaterThan(0))
350 ->withValue($security_settings->getPasswordMinLength()),
351 'password_max_length' => $ff->numeric(
352 $this->lng->txt('ps_password_max_length'),
353 $this->lng->txt('ps_password_max_length_info')
354 )->withRequired(true)
355 ->withValue($security_settings->getPasswordMaxLength()),
356 'password_min_uppercase_chars' => $ff->numeric(
357 $this->lng->txt('ps_password_uppercase_chars_num'),
358 $this->lng->txt('ps_password_uppercase_chars_num_info')
359 )->withRequired(true)
360 ->withValue($security_settings->getPasswordNumberOfUppercaseChars()),
361 'password_min_lowercase_chars' => $ff->numeric(
362 $this->lng->txt('ps_password_lowercase_chars_num'),
363 $this->lng->txt('ps_password_lowercase_chars_num_info')
364 )->withRequired(true)
365 ->withValue($security_settings->getPasswordNumberOfLowercaseChars()),
366 'password_max_age' => $ff->numeric(
367 $this->lng->txt('ps_password_max_age'),
368 $this->lng->txt('ps_password_max_age_info')
369 )->withRequired(true)
370 ->withValue($security_settings->getPasswordMaxAge()),
371 'password_assistance' => $ff->checkbox(
372 $this->lng->txt('enable_password_assistance'),
373 $this->lng->txt('password_assistance_info')
374 )->withValue($this->settings->get('password_assistance') === '1'),
375 'password_policy_hash' => $ff->hidden()->withValue(
376 $this->getPasswordPolicySettingsHash($security_settings)
377 )
378 ],
379 $this->lng->txt('ps_password_settings')
382 }
buildCheckPasswordMaxLengthConstraint()
buildCheckPasswordMinLengthConstraint()