You are here

function constant_contact_block_form_validate in Constant Contact 6

Same name and namespace in other branches
  1. 5 constant_contact.module \constant_contact_block_form_validate()

Implementation of hook_form_validate() validate the join mailing list block

File

./constant_contact.module, line 259

Code

function constant_contact_block_form_validate($form_id, $values) {
  global $user;
  $ok = empty($user->uid) && !empty($values['email']) || !empty($user->uid);
  if (!$ok) {
    drupal_set_message(t('You need to set your email address.'), 'error');
  }
  return $ok;
}