I have a standard login form which I built with the createFormBuilder() method. When I try to fetch input with
$this->get('request')->request->get('userName');
I get NULL beacuse $this->get('request')->request is a ParameterBag object who only has 'form' field with the input values. So when i do...
$this->get('request')->request->get('form')
i get the desired results but in an array
array(
'userName' => 'Dude',
'password' => 'password'
);
which is fine but is there a more intuitive way of fetching POST data?
I found this StackOverflow answer but it didn't help.
I also tried with the Request object as a parameter in the controller method but with no results.