mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
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:
parent
6424647f65
commit
b60f96c4ec
2 changed files with 13 additions and 5 deletions
|
@ -183,7 +183,8 @@ class phpbb_default_captcha
|
|||
function validate()
|
||||
{
|
||||
global $config, $db, $user;
|
||||
|
||||
|
||||
$error = '';
|
||||
$this->confirm_code = request_var('confirm_code', '');
|
||||
if (!$this->confirm_id)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,8 @@ class ucp_register
|
|||
{
|
||||
add_form_key('ucp_register_terms');
|
||||
}
|
||||
|
||||
|
||||
$captcha_solved = false;
|
||||
if ($config['enable_confirm'])
|
||||
{
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
|
@ -216,7 +217,8 @@ class ucp_register
|
|||
}
|
||||
else
|
||||
{
|
||||
$captcha->reset();
|
||||
$captcha_solved = true;
|
||||
// $captcha->reset();
|
||||
}
|
||||
|
||||
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 = 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 = '';
|
||||
|
||||
// Visual Confirmation - Show images
|
||||
if ($config['enable_confirm'])
|
||||
if ($config['enable_confirm'] && !$captcha_solved)
|
||||
{
|
||||
if ($change_lang || $confirm_refresh)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue