protected function ContributeManager::getUser in Contribute 8
Get the user account information from Drupal.org.
Return value
array The user account information from Drupal.org.
2 calls to ContributeManager::getUser()
- ContributeManager::getAccount in src/
ContributeManager.php - Get account status.
- ContributeManager::getContribution in src/
ContributeManager.php - Get contribution status.
File
- src/
ContributeManager.php, line 491
Class
- ContributeManager
- Class ContributeManager.
Namespace
Drupal\contributeCode
protected function getUser() {
$account_id = $this
->getAccountId();
$data = $this
->get('https://www.drupal.org/api-d7/user.json?name=' . urlencode($account_id));
if (isset($data['list']) && count($data['list']) === 1) {
return reset($data['list']);
}
else {
return [];
}
}