function lingotek_get_account_status in Lingotek Translation 7.2
Manually Triggered Account Status Check
1 string reference to 'lingotek_get_account_status'
- lingotek_menu in ./
lingotek.module - Implements hook_menu().
File
- ./
lingotek.admin.inc, line 530
Code
function lingotek_get_account_status() {
$account = LingotekAccount::instance();
$result = $account
->getAccountStatus();
// Returns false on fail.
if ($result === FALSE) {
// There was a problem retrieving the account status.
drupal_set_message(t('There was an error retrieving your account status. Please try again later.'), 'error');
drupal_goto(LINGOTEK_BASE_URL . '/settings');
}
else {
// We got a valid account status. Send the user back to the Lingotek settings page, via the second cache clearer.
drupal_set_message(t('Your account status has been updated.'));
drupal_goto('lingotek/flush-cache');
}
}