@@ -28,10 +28,10 @@ Your ``User`` entity will probably at least have the following fields:
|
28 | 28 | A nice piece of information to collect. You can also allow users to
|
29 | 29 | :ref:`login via email <registration-form-via-email>`.
|
30 | 30 |
|
31 |
| -* ``password`` |
| 31 | +``password`` |
32 | 32 | The encoded password.
|
33 | 33 |
|
34 |
| -* ``plainPassword`` |
| 34 | +``plainPassword`` |
35 | 35 | This field is *not* persisted: (notice no ``@ORM\Column`` above it). It
|
36 | 36 | temporarily stores the plain password from the registration form. This field
|
37 | 37 | can be validated then used to populate the ``password`` field.
|
@@ -49,7 +49,7 @@ With some validation added, your class may look something like this::
|
49 | 49 | /**
|
50 | 50 | * @ORM\Entity
|
51 | 51 | * @UniqueEntity(fields="email", message="Email already taken")
|
52 |
| -* @UniqueEntity(fields="username", message="Username already taken") |
| 52 | +* @UniqueEntity(fields="username", message="Username already taken") |
53 | 53 | */
|
54 | 54 | class User implements UserInterface
|
55 | 55 | {
|
@@ -253,7 +253,7 @@ controller for displaying the registration form::
|
253 | 253 |
|
254 | 254 | If you decide to NOT use annotation routing (shown above), then you'll
|
255 | 255 | need to create a route to this controller:
|
256 |
| -
|
| 256 | + |
257 | 257 | .. configuration-block::
|
258 | 258 |
|
259 | 259 | .. code-block:: yaml
|
@@ -296,7 +296,7 @@ Next, create the template:
|
296 | 296 | .. code-block:: html+jinja
|
297 | 297 |
|
298 | 298 | {# app/Resources/views/registration/register.html.twig #}
|
299 |
| -
|
| 299 | + |
300 | 300 | {{ form_start(form) }}
|
301 | 301 | {{ form_row('form.username') }}
|
302 | 302 | {{ form_row('form.email') }}
|
@@ -305,7 +305,7 @@ Next, create the template:
|
305 | 305 |
|
306 | 306 | <button type="submit">Register!</button>
|
307 | 307 | {{ form_end(form) }}
|
308 |
| -
|
| 308 | + |
309 | 309 | .. code-block:: html+php
|
310 | 310 |
|
311 | 311 | <!-- app/Resources/views/registration/register.html.php -->
|
@@ -370,8 +370,8 @@ registration form. The only trick is that you want to add this field to your for
|
370 | 370 | without adding an unnecessary new ``termsAccepted`` property to your ``User`` entity
|
371 | 371 | that you'll never need.
|
372 | 372 |
|
373 |
| -To do this, add a ``termsAccepted`` field to your form, but set its :ref:`mapped <reference-form-option-mapped>` |
374 |
| -option to ``false``:: |
| 373 | +To do this, add a ``termsAccepted`` field to your form, but set its |
| 374 | +:ref:`mapped <reference-form-option-mapped>` option to ``false``:: |
375 | 375 |
|
376 | 376 | // src/AppBundle/Form/UserType.php
|
377 | 377 | // ...
|
|
0 commit comments