Problem/Motivation
When calling the function nodejs_get_content_channel_users() in the module file, the response returns empty arrays.
[uids] => Array
(
)
[authTokens] => Array
(
)
I have logged the return from the nodejs application and it comes back as an object with arrays. The current return is trying to access an object of objects.
Steps to reproduce
Add user to a token channel and then call the function nodejs_get_content_channel_users().
Proposed resolution
Patch the return from
return array(
'uids' => !empty($node_response->users->uids) ? $node_response->users->uids : array(),
'authTokens' => !empty($node_response->users->authTokens) ? $node_response->users->authTokens : array(),
);
to
return array(
'uids' => !empty($node_response->users['uids']) ? $node_response->users['uids'] : array(),
'authTokens' => !empty($node_response->users['authTokens']) ? $node_response->users['authTokens'] : array(),
);
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
2dtw commented.
Comment #4
imclean commented