function nodejs_kick_user in Node.js integration 7
Same name and namespace in other branches
- 8 nodejs.module \nodejs_kick_user()
- 6 nodejs.module \nodejs_kick_user()
Kick a user from the node.js server.
Parameters
mixed $uid:
Return value
boolean TRUE if the user was kicked, FALSE otherwise.
1 string reference to 'nodejs_kick_user'
- nodejs_drush_command in ./
nodejs.drush.inc - Implements hook_drush_command().
File
- ./
nodejs.module, line 105
Code
function nodejs_kick_user($uid) {
// Http request went ok. Process Node.js server response.
if ($node_response = Nodejs::kickUser($uid)) {
if ($node_response->status == 'success') {
return TRUE;
}
else {
watchdog('nodejs', 'Error kicking uid "%uid" from the Node.js server. Server response: %error', array(
'%uid' => $uid,
'%error' => $node_response->error,
));
return FALSE;
}
}
else {
return FALSE;
}
}