Add captcha feature

Added re-captcha to the user profile form with the spam controls feature
This commit is contained in:
Tristan Olive 2013-04-01 21:57:13 -04:00 committed by Oliver Bock
parent 2b65fe6ba7
commit 73791391f6
3 changed files with 11 additions and 2 deletions

View File

@ -8,7 +8,7 @@ function spam_controls_captcha_default_points() {
'edit_profile_node_form' => array(
'form_id' => 'edit_profile_node_form',
'module' => NULL,
'captcha_type' => 'default',
'captcha_type' => NULL,
),
);
}

View File

@ -625,7 +625,7 @@ Zimbabwe|Zimbabwe',
'allowed_values_php' => '',
'widget' => array(
'rows' => 5,
'size' => '60',
'size' => '42',
'default_value' => array(
'0' => array(
'value' => '',

View File

@ -408,6 +408,15 @@ function boincuser_form_alter(&$form, $form_state, $form_id) {
break;
case 'profile_node_form':
if (module_exists('captcha')) {
// Add an optional captcha
$form['profile_captcha'] = array(
'#type' => 'captcha',
'#weight' => 999,
);
}
unset($form['title']);
unset($form['body_field']);
$form['#redirect'] = 'account/profile';