mirror of https://github.com/BOINC/boinc.git
Add captcha feature
Added re-captcha to the user profile form with the spam controls feature
This commit is contained in:
parent
2b65fe6ba7
commit
73791391f6
|
@ -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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -625,7 +625,7 @@ Zimbabwe|Zimbabwe',
|
|||
'allowed_values_php' => '',
|
||||
'widget' => array(
|
||||
'rows' => 5,
|
||||
'size' => '60',
|
||||
'size' => '42',
|
||||
'default_value' => array(
|
||||
'0' => array(
|
||||
'value' => '',
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue