title: Symfony2 set user role default User and Role files
body: <p>I have a problem with storing user role into database. I´m using original files written  here: <a href="http://symfony.com/doc/current/book/security.html" rel="nofollow">http://symfony.com/doc/current/book/security.html</a></p>
  
  <p>and here: <a href="http://symfony.com/doc/current/cookbook/security/entity_provider.html" rel="nofollow">http://symfony.com/doc/current/cookbook/security/entity_provider.html</a></p>
  
  <p>logging in a logging out is working. I can save user into database, but I don´t know how to save his role. Is it possible with this files, or I have to do one more file which will be serving this alone? I don´t want to use FOSUser Bundle ...  Thank you for your answers. Here are links:</p>
  
  <p>AccountController
   <a href="http://pastebin.com/ycrLyUcg" rel="nofollow">http://pastebin.com/ycrLyUcg</a></p>
  
  <p>Registration
   <a href="http://pastebin.com/Q7se6pnF" rel="nofollow">http://pastebin.com/Q7se6pnF</a></p>
  
  <p>RegistrationType
   <a href="http://pastebin.com/926tu0hj" rel="nofollow">http://pastebin.com/926tu0hj</a></p>
  
  <p>User
   <a href="http://pastebin.com/aNdQr46C" rel="nofollow">http://pastebin.com/aNdQr46C</a>
  Role
   <a href="http://pastebin.com/cg7QTk59" rel="nofollow">http://pastebin.com/cg7QTk59</a>
  UserRepository
   <a href="http://pastebin.com/LHPuy4We" rel="nofollow">http://pastebin.com/LHPuy4We</a></p>
  
  <p>Thank you very much for your answers</p>
  
  <p>EDIT 10.11.2013 23:00:</p>
  
  <ul>
  <li><a href="http://pastebin.com/DDygxzDN" rel="nofollow">http://pastebin.com/DDygxzDN</a>   AccountController.php</li>
  <li><a href="http://pastebin.com/SmSJMm4t" rel="nofollow">http://pastebin.com/SmSJMm4t</a>   User.php</li>
  <li><a href="http://pastebin.com/fEZk7JPa" rel="nofollow">http://pastebin.com/fEZk7JPa</a>   UserRole.php</li>
  </ul>
  
  <p>EDIT 11.11.2013 15:20</p>
  
  <ul>
  <li><a href="http://pastebin.com/Zu8w7cQ9" rel="nofollow">http://pastebin.com/Zu8w7cQ9</a>   Role.php</li>
  </ul>