You are here

function user_spamapi_form_alter in Spam 6

Form alter gets its own function so we can reference &$form without causing errors in PHP4 installations. (If we use spamapi, we have to set a default, which PHP4 doesn't support.)

File

content/spam_content_user.inc, line 234
Include file for integration with the user system.

Code

function user_spamapi_form_alter(&$form, &$form_state, $form_id) {

  // Scan users before they are inserted into the database
  if ($form_id == 'user_register' && is_array($form)) {
    $form['#validate'][] = 'user_spam_scan';
  }
}