Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- security:
- encoders:
- AppBundleEntityUser:
- algorithm: bcrypt
- $encoder = $this->container->get('security.password_encoder');
- $encoded = $encoder->encodePassword($user, $password);
- $form->handleRequest ( $request );
- $form->add ( 'oldpassword', 'password', array('label'=>'old password', 'required'=>true, 'error_bubbling'=>true, 'mapped' => false) );
- $form->get('oldpassword')->getData()
- $form->handleRequest ( $request );
- if ($form->isSubmitted ()) {
- if ( !$functions->passwordVerify($user, $form->get('oldpassword')->getData()) ) {
- $form->get ( 'oldpassword' ) ->addError ( new FormError ( "Your current password is invalid" ) );
- }
- public function passwordVerify($user=null, $oldpassword=null) {
- $encoder = $this->container->get('security.password_encoder');
- $valid = $encoder->isPasswordValid($user, $oldpassword);
- return $valid;
- }
- $valid = $encoder->isPasswordValid($user, $oldpassword);
- public function getSalt() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement