Last active
November 29, 2021 12:47
-
-
Save nelson-ph/ccf580d8ad2c54bcf5020f5c01cb61b9 to your computer and use it in GitHub Desktop.
Drupal - Password policy - review patch to add error message to the storage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: password_policy.module | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| diff --git a/password_policy.module b/password_policy.module | |
| --- a/password_policy.module | |
| +++ b/password_policy.module (date 1638189983327) | |
| @@ -197,10 +197,12 @@ | |
| $user, | |
| $roles | |
| ); | |
| + $form_state->set('password_fails_policies_message', null); | |
| if ($validationReport->isInvalid()) { | |
| $form_state->setErrorByName('pass', t('The password does not satisfy the password policies.')); | |
| $form_state->setError($form, $validationReport->getErrors()); | |
| + $form_state->set('password_fails_policies_message', $validationReport->getErrors()); | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment