How to get form values in Symfony2 controller

前端 未结 13 1515
挽巷
挽巷 2020-12-12 19:17

I am using a login form on Symfony2 with the following controller code

public function loginAction(Request $request)
{
    $user = new SiteUser();
    $form          


        
13条回答
  •  清歌不尽
    2020-12-12 19:52

    If you're using Symfony 2 security management, you don't need to get posted values, you only need to manage form template (see documentation).

    If you aren't using Symfony 2 security management, I advise you strongly to use it. If you don't want to or if you can't, can you give us the LoginType's sources ?

提交回复
热议问题