Skip to content

Instantly share code, notes, and snippets.

@midnai
Last active August 29, 2015 14:08
Show Gist options
  • Save midnai/b1ca096e11c3fb161004 to your computer and use it in GitHub Desktop.
Save midnai/b1ca096e11c3fb161004 to your computer and use it in GitHub Desktop.
change password in symfony2.3 using fosuserbundle
// in you submit action
$userManager = $this->container->get('fos_user.user_manager');
$user->setPlainPassword($password);
$userManager->updatePassword($user);
..... // perform some action
$em->flush();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment