remember_cookie_path: /userfront.php # used by sfGuardSecurityUser.class.php. The scope of the Remeber cookie
remember_cookie_domain: .localhost
+ recaptcha:
+ private_key: 6Lcg9dESAAAAACrrfQ5l9OLp3nq93lN1ra1q-8Kn
+ public_key: 6Lcg9dESAAAAAG-QQLfE8By9c8ufO8WjuhBMz2-M
if ($request->isMethod('post'))
{
- $this->form->bind($request->getParameter($this->form->getName()));
+ $captcha = array('recaptcha_challenge_field' => $request->getParameter('recaptcha_challenge_field'),
+ 'recaptcha_response_field' => $request->getParameter('recaptcha_response_field'),
+ );
+ $this->form->bind(array_merge($request->getParameter($this->form->getName()), array('captcha' => $captcha)));
+ //$this->form->bind($request->getParameter($this->form->getName()));
if ($this->form->isValid())
{
$user = $this->form->save();
$this->validatorSchema['language_id'] = new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Language'),
'required' => true));
+
+ $this->widgetSchema['captcha'] = new sfWidgetFormReCaptcha(array('public_key' => sfConfig::get('app_recaptcha_public_key')));
+
+ $this->validatorSchema['captcha'] = new sfValidatorReCaptcha(array('private_key' => sfConfig::get('app_recaptcha_private_key')));
}
}