Skip to content

Instantly share code, notes, and snippets.

@MaximStrutinskiy
Created January 25, 2017 11:02
Show Gist options
  • Save MaximStrutinskiy/1499d26efbdebbf06f74e88ccf185980 to your computer and use it in GitHub Desktop.
Save MaximStrutinskiy/1499d26efbdebbf06f74e88ccf185980 to your computer and use it in GitHub Desktop.
//Get password for mapped => false
$pass = $this->getForm()->get('password')->getData();
//Get password for mapped => true
$pass = $this->getForm()->get('password')->getData();
$pass = $this->getForm()->get('password')->getData();
if ($pass !== null) {
$object->setPlainPassword($pass);
}
$um = $this->getConfigurationPool()
->getContainer()
->get('fos_user.user_manager');
$um->updateUser($object, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment