function nodejs_send_user_message in Node.js integration 6
Same name and namespace in other branches
- 8 nodejs.module \nodejs_send_user_message()
- 7 nodejs.module \nodejs_send_user_message()
Send a message to given user.
Parameters
int $uid:
string $subject:
string $body:
1 call to nodejs_send_user_message()
- nodejs_send_user_message_multiple in ./
nodejs.module - Send a message to multiple users.
1 string reference to 'nodejs_send_user_message'
- nodejs_drush_command in ./
nodejs.drush.inc - Implements hook_drush_command().
File
- ./
nodejs.module, line 136
Code
function nodejs_send_user_message($uid, $subject, $body) {
$message = (object) array(
'broadcast' => FALSE,
'data' => (object) array(
'subject' => $subject,
'body' => $body,
),
'channel' => 'nodejs_user_' . $uid,
'callback' => 'nodejsNotify',
);
nodejs_enqueue_message($message);
}