function nodejs_get_content_channel_users in Node.js integration 7
Same name and namespace in other branches
- 8 nodejs.module \nodejs_get_content_channel_users()
Get a list of users in a content channel.
Parameters
mixed $channel:
File
- ./
nodejs.module, line 76
Code
function nodejs_get_content_channel_users($channel) {
$message = (object) array(
'channel' => $channel,
);
// Http request went ok, process Node.js server response.
if ($node_response = Nodejs::getContentTokenUsers($message)) {
if (isset($node_response->error)) {
watchdog('nodejs', 'Error getting content channel users for channel "%channel" on the Node.js server. Server response: %error', array(
'%channel' => $channel,
'%error' => $node_response->error,
));
return FALSE;
}
else {
return array(
'uids' => !empty($node_response->users->uids) ? $node_response->users->uids : array(),
'authTokens' => !empty($node_response->users->authTokens) ? $node_response->users->authTokens : array(),
);
}
}
else {
return FALSE;
}
}