You are here

function acquia_lift_ping_test_submit in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 acquia_lift.admin.inc \acquia_lift_ping_test_submit()

Submit callback for the ping test button.

1 string reference to 'acquia_lift_ping_test_submit'
acquia_lift_admin_form in ./acquia_lift.admin.inc
Admin form for configuring personalization backends.

File

./acquia_lift.admin.inc, line 233
acquia_lift.admin.inc Provides functions needed for the admin UI.

Code

function acquia_lift_ping_test_submit($form, &$form_state) {
  $api = AcquiaLiftAPI::getInstance(variable_get('acquia_lift_account_info', array()));
  if ($api
    ->pingTest()) {
    drupal_set_message(t('Successfully connected to the Acquia Lift service'));
  }
  else {
    drupal_set_message(t('There was a problem connecting to the Acquia Lift service. Please check your credentials'), 'error');
  }
}