FOSUserBundle – Update email address and email canonical not working

  api,, fosuserbundle, php, symfony4

After creating a user I want to make functionality to update email/ canonical email of the other accounts. I’m trying to update using:

$user = $this->fosUserManager->findUserBy(["id" => $id]);


But this is not updating correctly. Is there any other way this can be done. Preferably by using the api platform itself.

Thanks and Regards 🙂

Source: Symfony4 Questions