You are here

function user_spam_scan in Spam 6

Scan user before it is created in the database.

1 string reference to 'user_spam_scan'
user_spamapi_form_alter in content/spam_content_user.inc
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 244
Include file for integration with the user system.

Code

function user_spam_scan($form, &$form_state) {
  if ($form_state['clicked_button']['#value'] == t('Create new account')) {
    $account = $form['#post'];
    $_SESSION['spam_form'] = $form;
    spam_scan($account, 'user');
  }

  // spam_form is used if we catch spam in spam_scan, we can now free it
  if (isset($_SESSION['spam_form'])) {
    unset($_SESSION['spam_form']);
  }
}