diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 956026248c1..b1d76ad4f54 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -28,10 +28,10 @@ Your ``User`` entity will probably at least have the following fields: A nice piece of information to collect. You can also allow users to :ref:`login via email `. -* ``password`` +``password`` The encoded password. -* ``plainPassword`` +``plainPassword`` This field is *not* persisted: (notice no ``@ORM\Column`` above it). It temporarily stores the plain password from the registration form. This field 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:: /** * @ORM\Entity * @UniqueEntity(fields="email", message="Email already taken") - * @UniqueEntity(fields="username", message="Username already taken") + * @UniqueEntity(fields="username", message="Username already taken") */ class User implements UserInterface { @@ -253,7 +253,7 @@ controller for displaying the registration form:: If you decide to NOT use annotation routing (shown above), then you'll need to create a route to this controller: - + .. configuration-block:: .. code-block:: yaml @@ -296,7 +296,7 @@ Next, create the template: .. code-block:: html+jinja {# app/Resources/views/registration/register.html.twig #} - + {{ form_start(form) }} {{ form_row('form.username') }} {{ form_row('form.email') }} @@ -305,7 +305,7 @@ Next, create the template: {{ form_end(form) }} - + .. code-block:: html+php @@ -370,8 +370,8 @@ registration form. The only trick is that you want to add this field to your for without adding an unnecessary new ``termsAccepted`` property to your ``User`` entity that you'll never need. -To do this, add a ``termsAccepted`` field to your form, but set its :ref:`mapped ` -option to ``false``:: +To do this, add a ``termsAccepted`` field to your form, but set its +:ref:`mapped ` option to ``false``:: // src/AppBundle/Form/UserType.php // ...