You are here

function messaging_twitter_admin_form_validate in Messaging 6.4

Same name and namespace in other branches
  1. 6 messaging_twitter/messaging_twitter.module \messaging_twitter_admin_form_validate()
  2. 6.2 messaging_twitter/messaging_twitter.module \messaging_twitter_admin_form_validate()
  3. 6.3 messaging_twitter/messaging_twitter.module \messaging_twitter_admin_form_validate()

Validate admin settings

File

messaging_twitter/messaging_twitter.module, line 177
Messaging Twitter sending method

Code

function messaging_twitter_admin_form_validate($form, &$form_state) {
  if (function_exists('twitter_authenticate')) {
    _messaging_twitter_include();
    if (!twitter_authenticate($form_state['values']['messaging_twitter_username'], $form_state['values']['messaging_twitter_password'])) {
      form_set_error('name', t('Twitter authentication failed. Please check your username and password.'));
    }
  }
}