BTW, I fixed just creating the sfGuardAuth module on my app and using this code on the preExecute:
require_once( sfConfig::get( 'sf_plugins_dir' ).'/sfDoctrineGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php' ); class sfGuardAuthActions extends BasesfGuardAuthActions { public function preExecute() { parent::preExecute(); $this->getResponse()->setStatusCode( 401 ); } } And that's it. Cheers. On Sun, Aug 15, 2010 at 6:52 PM, Gustavo Adrian <comfortablynum...@gmail.com > wrote: > Thanks for your answer! I thought on using the way you suggest. I could use > a custom action and then inherit from it on my module actions. In the > preExecute do some check like the one you suggest and just set the response > code to 401 (in my case I just need that). But I was thinking on just > change the module sfGuardAuth and set the status code always to 401, with > any kind of request. > > Is there a reason to just set the status code to 401 on GET requests that > I'm not thinking of? > > > Thanks! > > > On Sun, Aug 15, 2010 at 6:14 PM, wodzik <wodzik...@gmail.com> wrote: > >> Hi, got the same problem in sfDoctrineGuardPlugin is problem with >> this. >> I resolve this like that... >> >> >> >> >> if ($request->isMethod('post') && $request- >> >hasParameter('signin')) >> { >> // some code >> } >> else >> { >> if ($request->isXmlHttpRequest()) >> { >> $this->setLayout(null); >> return 'Ajax'; >> } >> >> Add in checking if is method post if got parameter of form to login. >> If don't have this param he just do else and check if is Ajax. If yes, >> >> Made the templates : signinAjax.php with code for this what you want. >> >> I only add Java script code on the end of templates: >> >> >> $('#loginDiv').dialog(); // for jquery. >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en >> > > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en