public function ApiClient::usersInfo in Rocket.Chat 8.2
Same name and namespace in other branches
- 8 modules/rocket_chat_api/src/RocketChat/ApiClient.php \Drupal\rocket_chat_api\RocketChat\ApiClient::usersInfo()
Retrieve User information.
Parameters
string $userId: The userId to look up.
string $userName: The username to look up.
Return value
array Result array.
File
- modules/
rocket_chat_api/ src/ RocketChat/ ApiClient.php, line 422
Class
- ApiClient
- Class ApiClient.
Namespace
Drupal\rocket_chat_api\RocketChatCode
public function usersInfo($userId = NULL, $userName = NULL) {
$req = [];
$req['query'] = [];
if (!empty($userId)) {
$req['query']['userId'] = $userId;
}
if (!empty($userName)) {
$req['query']['username'] = $userName;
}
return $this
->getFromRocketChat('users.info', $req);
}