开发者

Change the post login target on FOSuserBundle Symfony2

When I log in /login, I'm sent to the root url /, however I'd like to send users straight to another page /dashboard - is this a configurable option?

I'm using FOSUserBundle and S开发者_JAVA百科ymfony2.


It seems that login is handled by SecurityBundle, not by FOSUserBundle. The solution is to put the login target here:

#app/config/security.yml

security:
    firewalls:
    somename:
        form_login:
            default_target_path: /your-desired-path

Symfony2 documentation here http://symfony.com/doc/current/reference/configuration/security.html#form-login-configuration

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜