function nodejs_add_user_to_channel_form_submit in Node.js integration 6
Same name and namespace in other branches
- 7 nodejs.module \nodejs_add_user_to_channel_form_submit()
Form submit callback - add a user to a channel on the Node.js server.
_state
Parameters
mixed $form:
File
- ./
nodejs.module, line 327
Code
function nodejs_add_user_to_channel_form_submit($form, &$form_state) {
$values = (object) $form_state['values'];
if (nodejs_add_user_to_channel($values->nodejs_uid, $values->nodejs_channel)) {
drupal_set_message(t("Added uid %uid to %channel.", array(
'%uid' => $values->nodejs_uid,
'%channel' => $values->nodejs_channel,
)));
}
else {
drupal_set_message(t("Failed to add uid %uid to %channel.", array(
'%uid' => ${$values}->nodejs_uid,
'%channel' => $values->nodejs_channel,
)), 'error');
}
}