Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Implement change password in Symfony2
- $builder->add('password', 'repeated', array(
- 'first_name' => 'New password',
- 'second_name' => 'Confirm new password',
- 'type' => 'password'
- ));
- // in action:
- $oldpassword = $user->getPassword();
- if ($request->getMethod() == 'POST')
- {
- $form->bindRequest($request);
- if ($form->isValid())
- {
- // check password here (by hashing new one)
Advertisement
Add Comment
Please, Sign In to add comment