Symfony form values missing
- by Cav
Hi,
I was writing a simple login form, everything works fine (validation etc.) but I can't get the values, there's my code:
public function executeIndex(sfWebRequest $request)
  {
      $this->getUser()->clearCredentials();
      $this->getUser()->setAuthenticated(false);
      $this->form = new LoginForm();
      if ($request->isMethod('post') && $request->hasParameter('login')) {
          $this->form->bind($request->getParameter('login'));
          if ($this->form->isValid()) {
              $this->getUser()->setAuthenticated(true);
              $this->getUser()->addCredential('user');
              $this->login = $this->form->getValue('login');
          }
      }
  }
$this-login is NULL. Now I checked almost everything, the form is valid, isBound() is true, count() returns 3, I can see the values in my request:
parameterHolder:
  action: index
  login: { login: foo, password: foo, _csrf_token: 53ebddee1883d7e3d6575d6fb1707a15 }
  module: login
BUT getValues() returns NULL, getValue('login') etc. returns NULL as well. How can it be?
And no, I don't want to use sfGuard-Plugins ;)