title: User password is not updated : easyadminbundle
body: <p>I'm using easyadmin and fosuserbundle.
  The problém that everytime i try to update(change) the user password , nothing is happen , the same old password still the same. I think maybe i miss some config . </p>
  
  <p>Config.yml</p>
  
  <pre><code>easyadmin:
          Admin:      
              class: AppBundle\Entity\User
              form:
                  fields: 
                      - username
                      - email
                      - { property: 'plainPassword' , type: 'text'}
  </code></pre>
  
  <p>User.php:</p>
  
  <pre><code>  &lt;?php
  // src/AppBundle/Entity/User.php
  
  namespace AppBundle\Entity;
  
  use FOS\UserBundle\Model\User as BaseUser;
  use Doctrine\ORM\Mapping as ORM;
  
  use Symfony\Component\Validator\Constraints as Assert;
  use Symfony\Component\HttpFoundation\File\UploadedFile;
  use Symfony\Component\Security\Core\Util\SecureRandom;
  use Symfony\Component\HttpFoundation\File\File;
  use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  use Vich\UploaderBundle\Mapping\Annotation as Vich;
  use Doctrine\Common\Collections\ArrayCollection;
  /**
   * @ORM\Entity
   * @ORM\Table(name="fos_user")
   */
  /**
   * @Vich\Uploadable
   * @ORM\Entity()
   * @ORM\HasLifecycleCallbacks()
   * @ORM\Table(name="user")
   *
   * @UniqueEntity("email")
   * 
   */
  class User extends BaseUser
  {
      /**
       * @ORM\Id
       * @ORM\Column(type="integer")
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
  
  
      /**
       * @ORM\Column(type="string", length=255,nullable=true)
       * 
       */
      public $nom;           
  
  
      /**
       * @ORM\Column(type="string",nullable=true,length=255,nullable=true)
      */
      public $prenom;   
  
      /**
       * @ORM\Column(type="string",nullable=true,length=255,nullable=true)
      */
      public $adresse;         
  
            /**
       * @ORM\Column(type="string", length=255,nullable=true)
       * 
       * @Assert\Range(
       *      min = 00000000,
       *      max = 99999999,minMessage="Entrer un numero de cin correct svp",maxMessage="Entrer un numero tel correct svp"
       * )
       */ 
      protected $phone;
  
      /**
       * @var Devise[]
       *
       * @ORM\OneToMany(targetEntity="Devise", mappedBy="buyer")
       */
      private $purchases;
  
      /**
       * The creation date of the product.
       *
       * @var \DateTime
       * @ORM\Column(type="datetime", name="created_at")
       */
      private $createdAt = null;
  
  
      public function __construct()
      {
          parent::__construct();
          // your own logic
          $this-&gt;purchases = new ArrayCollection();
   $this-&gt;createdAt = new \DateTime();
      }
      /**
       * Get id
       *
       * @return integer 
       */
      public function getId()
      {
          return $this-&gt;id;
      }
     /**
       * Set referance 
       *
       * @param string $referance 
       * 
       */
      public function setReferance($referance )
      {if($this-&gt;referance==NULL)        $referance ='2';
          $this-&gt;referance  = $referance ;
          return $this;
      }
      /**
       * Get referance 
       *
       * @return string 
       */
      public function getReferance ()
      {
          return $this-&gt;referance ;
      }
  
  
  
      /**
       * Set forename
       *
       * @param string $forname
       * @return User
       */
      public function setForename($forename)
      {
          $this-&gt;forname = $forename;
          return $this;
      }
      /**
       * Get forename
       *
       * @return string 
       */
      public function getForename()
      {
          return $this-&gt;forname;
      }
      /**
       * Asks whether the user is granted a particular role
       * 
       * @return boolean
       */
      public function isGranted($role)
      {
          return in_array($role, $this-&gt;getRoles());
      }
      /**
       * Set nickname
       *
       * @param string $nickname
       * @return User
       */
      public function setNickname($nickname)
      {
          $this-&gt;nickname = $nickname;
          return $this;
      }
      /**
       * Get nickname
       *
       * @return string 
       */
      public function getNickname()
      {
          return $this-&gt;nickname;
      }
      /**
       * Set lastEdited
       *
       * @param \DateTime $lastEdited
       * @return User
       */
      public function setLastEdited($lastEdited)
      {
          $this-&gt;lastEdited = $lastEdited;
          return $this;
      }
      /**
       * Get lastEdited
       *
       * @return \DateTime 
       */
      public function getLastEdited()
      {
          return $this-&gt;lastEdited;
      }
      /**
       * @ORM\PrePersist()
       * @ORM\PreUpdate()
       */
      public function setLastEditedValueAsNow() {
          $this-&gt;setLastEdited(new \DateTime());
      }
  
      /**
       * Set surname
       *
       * @param string $surname
       * @return User
       */
      public function setSurname($surname)
      {
          $this-&gt;surname = $surname;
          return $this;
      }
      /**
       * Get surname
       *
       * @return string 
       */
      public function getSurname()
      {
          return $this-&gt;surname;
      }
  
      /**
       * Set updatedAt
       *
       * @param \DateTime $updatedAt
       *
       * @return Utilisateurs
       */
      public function setUpdatedAt($updatedAt)
      {
          $this-&gt;updatedAt = $updatedAt;
          return $this;
      }
      /**
       * Get updatedAt
       *
       * @return \DateTime
       */
      public function getUpdatedAt()
      {
          return $this-&gt;updatedAt;
      }
      public function __toString()
      {if ($this-&gt;prenom != null &amp;&amp; $this-&gt;nom!= null &amp;&amp; $this-&gt;phone != null) {
          return 'prenom&amp;nom :'.$this-&gt;prenom.' '.$this-&gt;nom.'  |  phone : '.$this-&gt;phone ;
      }
        else  return 'id :'.$this-&gt;id.' |  username : '.$this-&gt;username ; }
      /**
       * Set nom
       *
       * @param string $nom
       *
       * @return Utilisateurs
       */
      public function setNom($nom)
      {
          $this-&gt;nom = $nom;
          return $this;
      }
      /**
       * Get nom
       *
       * @return string
       */
      public function getNom()
      {
          return $this-&gt;nom;
      }
      /**
       * Set prenom
       *
       * @param string $prenom
       *
       * @return Utilisateurs
       */
      public function setPrenom($prenom)
      {
          $this-&gt;prenom = $prenom;
          return $this;
      }
      /**
       * Get prenom
       *
       * @return string
       */
      public function getPrenom()
      {
          return $this-&gt;prenom;
      }
      /**
       * Set ville
       *
       * @param string $ville
       *
       * @return Utilisateurs
       */
      public function setVille($ville)
      {
          $this-&gt;ville = $ville;
          return $this;
      }
      /**
       * Get ville
       *
       * @return string
       */
      public function getVille()
      {
          return $this-&gt;ville;
      }
      /**
       * Set class
       *
       * @param string $class
       *
       * @return Utilisateurs
       */
      public function setClass($class)
      {
          $this-&gt;class = $class;
          return $this;
      }
      /**
       * Get class
       *
       * @return string
       */
      public function getClass()
      {
          return $this-&gt;class;
      }
      /**
       * Set phone
       *
       * @param string $phone
       *
       * @return Utilisateurs
       */
      public function setPhone($phone)
      {
          $this-&gt;phone = $phone;
          return $this;
      }
      /**
       * Get phone
       *
       * @return string
       */
      public function getPhone()
      {
          return $this-&gt;phone;
      }
  
      /**
       * Add purchase
       *
       * @param \AppBundle\Entity\Devise $purchase
       *
       * @return User
       */
      public function addPurchase(\AppBundle\Entity\Devise $purchase)
      {
          $this-&gt;purchases[] = $purchase;
  
          return $this;
      }
  
      /**
       * Remove purchase
       *
       * @param \AppBundle\Entity\Devise $purchase
       */
      public function removePurchase(\AppBundle\Entity\Devise $purchase)
      {
          $this-&gt;purchases-&gt;removeElement($purchase);
      }
  
      /**
       * Get purchases
       *
       * @return \Doctrine\Common\Collections\Collection
       */
      public function getPurchases()
      {
          return $this-&gt;purchases;
      }
  
      /**
       * Set adresse
       *
       * @param string $adresse
       *
       * @return User
       */
      public function setAdresse($adresse)
      {
          $this-&gt;adresse = $adresse;
  
          return $this;
      }
  
      /**
       * Get adresse
       *
       * @return string
       */
      public function getAdresse()
      {
          return $this-&gt;adresse;
      }
  
      /**
       * Set createdAt
       *
       * @param \DateTime $createdAt
       *
       * @return User
       */
      public function setCreatedAt($createdAt)
      {
          $this-&gt;createdAt = $createdAt;
  
          return $this;
      }
  
      /**
       * Get createdAt
       *
       * @return \DateTime
       */
      public function getCreatedAt()
      {
          return $this-&gt;createdAt;
      }
  
          public function serialize()
      {
          return serialize(array(
              $this-&gt;id,
              $this-&gt;username,
              $this-&gt;password,
          ));
      }
      public function unserialize($serialized)
      {
          list(
              $this-&gt;id,
              $this-&gt;username,
              $this-&gt;password) = unserialize($serialized);
      }
  }
  </code></pre>