Skip to content

Commit

Permalink
EZP-30983: Prevented users from reusing old password (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs authored and lserwatka committed Oct 4, 2019
1 parent e4ebed9 commit 455795f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bundle/Resources/translations/ezrepoforms_content_type.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,11 @@
<target>Days before a user is notified about expiration</target>
<note>key: field_definition.ezuser.password_ttl_warning</note>
</trans-unit>
<trans-unit id="c196b953a8bc8966aeeb771c2c9e653bbe8062bb" resname="field_definition.ezuser.require_new_password">
<source>Prevent reusing old password</source>
<target>Prevent reusing old password</target>
<note>key: field_definition.ezuser.require_new_password</note>
</trans-unit>
<trans-unit id="92d9243bb9fac540233dc376b41a3bcd41615ccc" resname="field_definition.field_group">
<source>Category</source>
<target>Category</target>
Expand Down
4 changes: 4 additions & 0 deletions lib/FieldType/Mapper/UserAccountFieldValueFormMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public function mapFieldDefinitionForm(FormInterface $fieldDefinitionForm, Field
'property_path' => $validatorPropertyPathPrefix . '[requireAtLeastOneNonAlphanumericCharacter]',
]);

$fieldDefinitionForm->add('requireNewPassword', PasswordConstraintCheckboxType::class, [
'property_path' => $validatorPropertyPathPrefix . '[requireNewPassword]',
]);

$fieldDefinitionForm->add('minLength', IntegerType::class, [
'required' => false,
'property_path' => $validatorPropertyPathPrefix . '[minLength]',
Expand Down

0 comments on commit 455795f

Please sign in to comment.