Index: branches/RC/core/units/users/users_event_handler.php =================================================================== diff -u -N -r10517 -r10539 --- branches/RC/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 10517) +++ branches/RC/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 10539) @@ -1291,27 +1291,6 @@ } /** - * Apply some special processing to - * object beeing recalled before using - * it in other events that call prepareObject - * - * @param Object $object - * @param kEvent $event - * @access protected - */ - function prepareObject(&$object, &$event) - { - parent::prepareObject($object, $event); - - if (!$this->Application->IsAdmin()) { - if ($this->Application->RecallVar('register_captcha_code')) return ; - $captcha_helper =& $this->Application->recallObject('CaptchaHelper'); - /* @var $captcha_helper kCaptchaHelper */ - $this->Application->StoreVar('register_captcha_code', $captcha_helper->GenerateCaptchaCode()); - } - } - - /** * Apply custom processing to item * * @param kEvent $event @@ -1328,14 +1307,13 @@ $object->SetDBField('Password_plain', $object->GetDirtyField('Password')); } - // Validate captcha image if it's requried - if ($this->Application->ConfigValue('RegistrationCaptcha') && $object->GetDBField('Captcha') != $this->Application->RecallVar('register_captcha_code')) { - $object->SetError('Captcha', 'captcha_error', 'lu_captcha_error'); + // validate here, because subscribing procedure should not validate captcha code + if ($this->Application->ConfigValue('RegistrationCaptcha')) { $captcha_helper =& $this->Application->recallObject('CaptchaHelper'); /* @var $captcha_helper kCaptchaHelper */ - $this->Application->StoreVar('register_captcha_code', $captcha_helper->GenerateCaptchaCode()); - } + $captcha_helper->validateCode($event, false); + } } }