Skip to content

Commit

Permalink
Update code example to fit description
Browse files Browse the repository at this point in the history
The text mentions an $encoder object, which wasn't created.
  • Loading branch information
xelaris committed Jan 3, 2015
1 parent 0df1064 commit bd34c6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1175,8 +1175,8 @@ in the following way from a controller::
// whatever *your* User object is
$user = new AppBundle\Entity\User();
$plainPassword = 'ryanpass';
$encoded = $this->container->get('security.password_encoder')
->encodePassword($user, $plainPassword);
$encoder = $this->container->get('security.password_encoder');
$encoded = $encoder->encodePassword($user, $plainPassword);

$user->setPassword($encoded);

Expand Down

0 comments on commit bd34c6b

Please sign in to comment.