Skip to content

Commit

Permalink
Merge pull request #3 from nswdpc/fix-message
Browse files Browse the repository at this point in the history
Fix: display correct value
  • Loading branch information
JamesDPC authored Sep 4, 2023
2 parents 9c69644 + 8f1f745 commit 529927f
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/Extensions/MemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,15 @@ public function updateSummaryFields(&$fields)

public function setPasswordValidationInformation(FormField $field)
{
$validator = PasswordValidator::create();
$min_length = $validator->config()->get('min_length');
$field->setDescription(
'<div class="alert alert-info">'
. _t(
Pwnage::class . '.PASSWORD_MIN_LENGTH',
'Minimum length: {min_length} characters',
[
'min_length' => $min_length
]
)
. '</div>');
$validator = Injector::inst()->get(PasswordValidator::class);
$min_length = $validator->getMinLength();
$field->setDescription(_t(
Pwnage::class . '.PASSWORD_MIN_LENGTH',
'Minimum length: {min_length} characters',
[
'min_length' => $min_length
]
));
}

/**
Expand Down

0 comments on commit 529927f

Please sign in to comment.