public function updateUser(UserInterface $user) { $this->updateCanonicalFields($user); $this->updatePassword($user); $this->em->persist($user); $this->em->flush(); }