title: In FOSUserBundle, how to create an alternative logout
body: <p>Using FOSUserBundle and Symfony2,</p>
  
  <p>in my site, depending on the roles of the user that is logged in, I want to make the Logout to redirect alternatively to two different pages.</p>
  
  <p>So, I want to do something like this:</p>
  
  <pre><code>{% if is_granted("ROLE_PREMIUM") %}
    &lt;a href="{{ path('fos_user_security_logout_premium') }}"&gt;{{ 'layout.logout'|trans({}, 'FOSUserBundle') }}&lt;/a&gt;
  {% else %}
    &lt;a href="{{ path('fos_user_security_logout') }}"&gt;{{ 'layout.logout'|trans({}, 'FOSUserBundle') }}&lt;/a&gt;
  {% endif %}
  </code></pre>
  
  <p>And then, somehow, do something like this:</p>
  
  <pre><code>&lt;route id="fos_user_security_logout" pattern="/logout"&gt;
      &lt;default key="_controller"&gt;FOSUserBundle:Security:logout&lt;/default&gt;
  &lt;/route&gt;
  &lt;route id="fos_seller_security_logout" pattern="/logoutPremium"&gt;
      &lt;default key="_controller"&gt;FOSUserBundle:Security:logoutPremium&lt;/default&gt;
  &lt;/route&gt;
  </code></pre>
  
  <p>But, since all in logout is done in <code>config.yml</code>, putting all this configuration about login and logout, I don't know how to configure a second trigger and implement it. Actually, the only thing that I want to do is to redirect the user to two different pages according to the role. All the rest should stay the same.</p>
  
  <p>Anything to put around here in <code>security.yml</code>?</p>
  
  <pre><code>        logout:
            path:   /logout
            target: /main/user
  </code></pre>
  
  <p>Thanks a lot</p>