You are here

function spambot_user_spam_admin_form_validate in Spambot 6.3

Same name and namespace in other branches
  1. 7 spambot.pages.inc \spambot_user_spam_admin_form_validate()

File

./spambot.pages.inc, line 111

Code

function spambot_user_spam_admin_form_validate($form, &$form_state) {
  $key_required = !empty($form_state['values']['report']['nids']) && count(array_filter($form_state['values']['report']['nids'])) ? TRUE : FALSE;
  if (module_exists('comment')) {
    $key_required = !empty($form_state['values']['report']['cids']) && count(array_filter($form_state['values']['report']['cids'])) || $key_required;
  }
  if ($key_required && !variable_get('spambot_sfs_api_key', FALSE)) {
    form_set_error('', t('To report spammers to www.stopforumspam.com, you need to register for an API key at <a href="http://www.stopforumspam.com">www.stopforumspam.com</a> and enter it into the !page.', array(
      '!page' => l('spambot settings', 'admin/settings/spambot'),
    )));
  }
}