File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -224,9 +224,8 @@ controller for displaying the registration form::
224224 $form->handleRequest($request);
225225 if ($form->isValid() && $form->isSubmitted()) {
226226 // 3) Encode the password (you could also do this via Doctrine listener)
227- $encoder = $this->get('security.encoder_factory')
228- ->getEncoder($user);
229- $password = $encoder->encodePassword($user->getPlainPassword(), $user->getSalt());
227+ $password = $this->get('security.password_encoder')
228+ ->encodePassword($user, $user->getPlainPassword());
230229 $user->setPassword($password);
231230
232231 // 4) save the User!
@@ -237,9 +236,7 @@ controller for displaying the registration form::
237236 // ... do any other work - like send them an email, etc
238237 // maybe set a "flash" success message for the user
239238
240- $redirectUrl = $this->generateUrl('replace_with_some_route');
241-
242- return $this->redirect($redirectUrl);
239+ return $this->redirectToRoute('replace_with_some_route');
243240 }
244241
245242 return $this->render(
You can’t perform that action at this time.
0 commit comments