title: Assign a Role with FosUserBundle
body: <p>I'm really new to Symfony, I'm trying to register a ROLE to a User with FosUserBundle but I can't manage how to do it. 
  Actually I integrated also PUGXMultiUserBundle in order to have two different form for two different roles. 
  Can anyone help me?</p>
  
  <p>Thanks in advance</p>
  
  <p>--UPDATE--</p>
  
  <p>I report my code in order to explain clearly. I create this files with the guide of <a href="https://github.com/PUGX/PUGXMultiUserBundle/blob/master/Resources/doc/index.md#7-using-the-user-manager" rel="nofollow noreferrer">PUGXMultiUserBundle</a></p>
  
  <p>This is my entity:</p>
  
  <pre><code>//C:\BitNami\wampstack-5.4.23-0\frameworks\symfony\src\Acme\ManagementBundle\Entity\UserGroundStation.php
  &lt;?php
  
  namespace Acme\ManagementBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use PUGX\MultiUserBundle\Validator\Constraints\UniqueEntity;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="user_GroundStation")
   * @UniqueEntity(fields = "username", targetClass = "Acme\ManagementBundle\Entity\User", message="fos_user.username.already_used")
   * @UniqueEntity(fields = "email", targetClass = "Acme\ManagementBundle\Entity\User", message="fos_user.email.already_used")
   */
  class UserGroundStation extends User
  {
      /**
       * @ORM\Id
       * @ORM\Column(type="integer")
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
  }
  </code></pre>
  
  <p>And this is the controller</p>
  
  <pre><code>C:\BitNami\wampstack-5.4.23-0\frameworks\symfony\src\Acme\ManagementBundle\ControllerRegistrationController.php
  &lt;?php
  
  namespace Acme\ManagementBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  
  class RegistrationController extends Controller
  {
      public function registerUserGroundStationAction()
      {
          return $this-&gt;container
                      -&gt;get('pugx_multi_user.registration_manager')
                      -&gt;register('Acme\ManagementBundle\Entity\UserGroundStation');
      }
  }
  </code></pre>
  
  <p>Sorry for the dumb question, but it's my first project and I feel a bit misplace.</p>
  
  <p>--UPDATE--SOLVED--</p>
  
  <p>I found the solution <a href="https://stackoverflow.com/questions/19321146/how-to-assign-roles-on-successful-registration">here</a>
  Sorry for the redundance of the question, I didn't find it by Google. </p>