function nodejs_subscribe_is_user_subscribed_to_node in Node.js integration 7
Same name and namespace in other branches
- 6 nodejs_subscribe/nodejs_subscribe.module \nodejs_subscribe_is_user_subscribed_to_node()
Check to see if the given uid is subscribed to the given node.
Parameters
mixed $uid:
mixed $nid:
Return value
boolean
2 calls to nodejs_subscribe_is_user_subscribed_to_node()
- nodejs_subscribe_node_view in nodejs_subscribe/
nodejs_subscribe.module - Implements hook_node_view().
- nodejs_subscribe_subscribe_node in nodejs_subscribe/
nodejs_subscribe.module - Page callback for subscribing/unsubscribing to a node.
File
- nodejs_subscribe/
nodejs_subscribe.module, line 74
Code
function nodejs_subscribe_is_user_subscribed_to_node($uid, $nid) {
return db_query('SELECT nid FROM {nodejs_subscribe_subscription} WHERE uid = :uid AND nid = :nid', array(
':uid' => $uid,
':nid' => $nid,
))
->fetchField();
}