@@ -35,7 +35,7 @@ Your ``User`` entity will probably at least have the following fields:
3535``plainPassword ``
3636 This field is *not * persisted: (notice no ``@ORM\Column `` above it). It
3737 temporarily stores the plain password from the registration form. This field
38- can be validated then used to populate the ``password `` field.
38+ can be validated and is then used to populate the ``password `` field.
3939
4040With some validation added, your class may look something like this::
4141
@@ -127,17 +127,18 @@ With some validation added, your class may look something like this::
127127
128128 public function getSalt()
129129 {
130- // The bcrypt algorithm don 't require a separate salt.
130+ // The bcrypt algorithm doesn 't require a separate salt.
131131 // You *may* need a real salt if you choose a different encoder.
132132 return null;
133133 }
134134
135135 // other methods, including security methods like getRoles()
136136 }
137137
138- The ``UserInterface `` requires a few other methods and your ``security.yml `` file
139- needs to be configured properly to work with the ``User `` entity. For a more full
140- example, see the :ref: `Entity Provider <security-crete-user-entity >` article.
138+ The :class: `Symfony\\ Component\\ Security\\ Core\\ User\\ UserInterface ` requires
139+ a few other methods and your ``security.yml `` file needs to be configured
140+ properly to work with the ``User `` entity. For a more complete example, see
141+ the :ref: `Entity Provider <security-crete-user-entity >` article.
141142
142143.. _cookbook-registration-password-max :
143144
@@ -186,7 +187,7 @@ Next, create the form for the ``User`` entity::
186187 public function configureOptions(OptionsResolver $resolver)
187188 {
188189 $resolver->setDefaults(array(
189- 'data_class' => 'AppBundle\Entity\User'
190+ 'data_class' => 'AppBundle\Entity\User',
190191 ));
191192 }
192193
@@ -201,7 +202,8 @@ There are just three fields: ``email``, ``username`` and ``plainPassword``
201202
202203.. tip ::
203204
204- To explore more things about the Form component, read :doc: `/book/forms `.
205+ To explore more things about the Form component, read the
206+ :doc: `chapter about forms </book/forms >` in the book.
205207
206208Handling the Form Submission
207209----------------------------
@@ -213,12 +215,11 @@ into the database::
213215 // src/AppBundle/Controller/RegistrationController.php
214216 namespace AppBundle\Controller;
215217
216- use Symfony\Bundle\FrameworkBundle\Controller\Controller;
217-
218218 use AppBundle\Form\UserType;
219219 use AppBundle\Entity\User;
220- use Symfony\Component\HttpFoundation\Request;
221220 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
221+ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
222+ use Symfony\Component\HttpFoundation\Request;
222223
223224 class RegistrationController extends Controller
224225 {
@@ -245,7 +246,7 @@ into the database::
245246 $em->persist($user);
246247 $em->flush();
247248
248- // ... do any other work - like send them an email, etc
249+ // ... do any other work - like sending them an email, etc
249250 // maybe set a "flash" success message for the user
250251
251252 return $this->redirectToRoute('replace_with_some_route');
@@ -373,8 +374,8 @@ See :doc:`/cookbook/form/form_customization` for more details.
373374Update your Database Schema
374375---------------------------
375376
376- If you've updated the User entity during this tutorial, you have to update your
377- database schema using this command:
377+ If you've updated the `` User `` entity during this tutorial, you have to update
378+ your database schema using this command:
378379
379380.. code-block :: bash
380381
@@ -406,9 +407,9 @@ return the ``email`` property::
406407 // ...
407408 }
408409
409- Next, just update the ``providers `` section of your ``security.yml `` so that Symfony
410- knows to load your users via the ``email `` property on login. See
411- :ref: `authenticating-someone-with-a-custom-entity-provider `.
410+ Next, just update the ``providers `` section of your ``security.yml `` file
411+ so that Symfony knows how to load your users via the ``email `` property on
412+ login. See :ref: `authenticating-someone-with-a-custom-entity-provider `.
412413
413414Adding a "accept terms" Checkbox
414415--------------------------------
0 commit comments