File tree
Expand file treeCollapse file tree1 file changed
+3
-6
lines changed Expand file treeCollapse file tree1 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::
|
224 | 224 | $form->handleRequest($request);
|
225 | 225 | if ($form->isValid() && $form->isSubmitted()) {
|
226 | 226 | // 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()); |
230 | 229 | $user->setPassword($password);
|
231 | 230 |
|
232 | 231 | // 4) save the User!
|
@@ -237,9 +236,7 @@ controller for displaying the registration form::
|
237 | 236 | // ... do any other work - like send them an email, etc
|
238 | 237 | // maybe set a "flash" success message for the user
|
239 | 238 |
|
240 |
| -$redirectUrl = $this->generateUrl('replace_with_some_route'); |
241 |
| - |
242 |
| -return $this->redirect($redirectUrl); |
| 239 | +return $this->redirectToRoute('replace_with_some_route'); |
243 | 240 | }
|
244 | 241 |
|
245 | 242 | return $this->render(
|
|
You can’t perform that action at this time.
0 commit comments