public function deleteUser(UserInterface $user) { $this->getEntityManager()->remove($user); $this->getEntityManager()->flush(); }