File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,28 @@ with the ``value`` attribute set to its true value only upon submission.
35
35
If you want to render your password field *with * the password value already
36
36
entered into the box, set this to false and submit the form.
37
37
38
+ ``hash_mapping ``
39
+ ~~~~~~~~~~~~~~~~
40
+
41
+ **type **: ``string `` **default **: ``null ``
42
+
43
+ If set, the password will be hashed using the PasswordHasher component and
44
+ stored in the specified property.
45
+
46
+ Data passed to the form must be a ``PasswordAuthenticatedUserInterface `` object.
47
+
48
+ .. caution ::
49
+
50
+ To minimize the risk of leaking the plain password,
51
+ this option can only be used with the ``mapped `` option set to ``false ``.
52
+
53
+ $builder->add('plainPassword', PasswordType::class, [
54
+ 'hash_mapping' => 'password',
55
+ 'mapped' => false,
56
+ ]);
57
+
58
+ See the :ref: `"mapped" option documentation <reference-form-mapped >`.
59
+
38
60
Overridden Options
39
61
------------------
40
62
@@ -81,6 +103,8 @@ The default value is ``''`` (the empty string).
81
103
82
104
.. include :: /reference/forms/types/options/label_format.rst.inc
83
105
106
+ .. _reference-form-mapped :
107
+
84
108
.. include :: /reference/forms/types/options/mapped.rst.inc
85
109
86
110
.. include :: /reference/forms/types/options/required.rst.inc
You can’t perform that action at this time.
0 commit comments