public function Lingotek::getAccountInfo in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8 src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 8.2 src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 4.0.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 3.0.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 3.1.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 3.2.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 3.3.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 3.5.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 3.6.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 3.7.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
- 3.8.x src/Lingotek.php \Drupal\lingotek\Lingotek::getAccountInfo()
Get the account information.
Return value
array|bool Array with account info. FALSE in case of error. The keys are user_id, username, login_id, email, and name.
Overrides LingotekInterface::getAccountInfo
File
- src/
Lingotek.php, line 132
Class
- Lingotek
- The connecting class between Drupal and Lingotek
Namespace
Drupal\lingotekCode
public function getAccountInfo() {
try {
$response = $this->api
->getAccountInfo();
} catch (LingotekApiException $e) {
// TODO: log a warning
return FALSE;
}
if ($response) {
return json_decode($response
->getBody(), TRUE);
}
// TODO: log a warning
return FALSE;
}