You are here

function nodejs_remove_user_from_channel in Node.js integration 6

Same name and namespace in other branches
  1. 8 nodejs.module \nodejs_remove_user_from_channel()
  2. 7 nodejs.module \nodejs_remove_user_from_channel()

Remove a user from a channel.

Parameters

mixed $uid:

mixed $channel:

Return value

boolean

1 call to nodejs_remove_user_from_channel()
nodejs_subscribe_delete in nodejs_subscribe/nodejs_subscribe.module
Delete a subscription to a node.

File

./nodejs.module, line 535

Code

function nodejs_remove_user_from_channel($uid, $channel) {
  $result = Nodejs::removeUserFromChannel($uid, $channel);
  if (isset($result->error)) {
    $params = array(
      '%uid' => $uid,
      '%channel' => $channel,
      '%code' => $result->code,
      '%error' => $result->error,
    );
    watchdog('nodejs', t('Error removing user %uid from channel %channel on Node.js server: [%code] %error', $params));
    return (object) array();
  }
  else {
    return TRUE;
  }
}