See if this plays out: do not require people to re-enter the CAPTCHA

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9591 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2009-06-14 15:24:03 +00:00
parent 6424647f65
commit b60f96c4ec
2 changed files with 13 additions and 5 deletions

View file

@ -183,7 +183,8 @@ class phpbb_default_captcha
function validate() function validate()
{ {
global $config, $db, $user; global $config, $db, $user;
$error = '';
$this->confirm_code = request_var('confirm_code', ''); $this->confirm_code = request_var('confirm_code', '');
if (!$this->confirm_id) if (!$this->confirm_id)
{ {

View file

@ -52,7 +52,8 @@ class ucp_register
{ {
add_form_key('ucp_register_terms'); add_form_key('ucp_register_terms');
} }
$captcha_solved = false;
if ($config['enable_confirm']) if ($config['enable_confirm'])
{ {
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
@ -216,7 +217,8 @@ class ucp_register
} }
else else
{ {
$captcha->reset(); $captcha_solved = true;
// $captcha->reset();
} }
if ($config['max_reg_attempts'] && $captcha->get_attempt_count() > $config['max_reg_attempts']) if ($config['max_reg_attempts'] && $captcha->get_attempt_count() > $config['max_reg_attempts'])
@ -423,12 +425,17 @@ class ucp_register
{ {
$s_hidden_fields['coppa'] = $coppa; $s_hidden_fields['coppa'] = $coppa;
} }
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
if ($config['enable_confirm'])
{
$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
}
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
$confirm_image = ''; $confirm_image = '';
// Visual Confirmation - Show images // Visual Confirmation - Show images
if ($config['enable_confirm']) if ($config['enable_confirm'] && !$captcha_solved)
{ {
if ($change_lang || $confirm_refresh) if ($change_lang || $confirm_refresh)
{ {