Search code examples
symfonyoverridingfosuserbundle

How to override Login Form for FOSUserBundle


I'm trying to override the login form of FOSUserBundle. I've seen on the web that you have to create new folders. So here's my project:

Intranet
 |___ templates
       |___ ApplicationFOSUserBundle
             |___ Security
                   |___ login.html.twig (the one that's supposed to override the other on)

But it doesn't work. I thought of changing directly in the SecurityController in the vendor, but of course I know that I can't do that. I've also tried to create a Resources/views folders but same output, doesn't work.

Does anyone have an idea? Thanks


Solution

  • For anyone who wants to do the same, you actually have to override it like that:

    Intranet
     |___ src
           |___ Resources
                 |___ FOSUserBundle
                       |___ views
                            |___ Security
                                  |___ login.html.twig