private function changePassword(UserInterface $user, $password)
    {
        if ('' === $password) {
            throw new MissingPasswordException();
        }
        $em = $this->getDoctrine()->getManager();
        $user->setPassword($this->encodePassword($user, $password, $user->getSalt()));
        $em->persist($user);
        $em->flush();
    }