Of course! I should have thought about this test! Thanks a lot Stig, it fixes my problem :)
Gregoire. On Aug 13, 8:31 am, Stig Manning <[email protected]> wrote: > I have revisited this problem and the solution is very simple. Basically > the problem is that you are processing the form submission as a login > attempt, due to the login function executing because of the forward. > > The solution add a test to see if the post *doesn't* contain the login > data. See below: > > $this->login_form = new LoginForm; > //User is posting from another form (possibly due to session timeout), > ignore this post > if ($request->isMethod('post')&&!$request->hasParameter('login')) > { > return; > > } > > if ($request->isMethod('post')) > { > $this->login_form->bind($request->getParameter('login')); > if ($this->login_form->isValid()) > { > $this->redirect('@account-index'); > } > > } > > Hope this helps! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
