0

i am using FOSUserBundle and i have created and activated the user now when i log in using following url

http://localhost/symfony/web/app_dev.php/login

enter image description here

i am getting following erro for it , i dont know why is this happening

here is my routes, it seems its pointing to DefaultController but i dont know where FOSUSerBundle supposed to point after login

_welcome:
    pattern:  /
    defaults: { _controller: AcmeDemoBundle:Welcome:index }

_demo_secured:
    resource: "@AcmeDemoBundle/Controller/SecuredController.php"
    type:     annotation

_demo:
    resource: "@AcmeDemoBundle/Controller/DemoController.php"
    type:     annotation
    prefix:   /demo

_demo:
    resource: "@AcmeDemoBundle/Controller/WSChat.php"
    type:     annotation
    prefix:   /chat

_demo:
    resource: "@AcmeDemoBundle/Controller/OpenPubSub.php"
    type:     annotation
    prefix:   /pubusb  

fos_user_security:
    resource: "@FOSUserBundle/Resources/config/routing/security.xml"

fos_user_profile:
    resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
    prefix: /profile

fos_user_register:
    resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
    prefix: /register

fos_user_resetting:
    resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
    prefix: /resetting

fos_user_change_password:
    resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
    prefix: /profile

enter image description here

4

1 回答 1

1

There are multiple routes that you have defined with the same name _demo .

Regarding FOSUserBundle you can configure the login redirect from the security.yml.

form_login:
   provider: fos_userbundle
   csrf_provider: form.csrf_provider
   always_use_default_target_path: true
   default_target_path: /

The default_target_path is where you will need to specify the url where the user should be redirected to on successful login.

于 2013-10-03T11:46:14.950 回答