You are here

function nodejs_user_set_online in Node.js integration 7

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

Set the user as online.

Parameters

$uid:

1 call to nodejs_user_set_online()
nodejs_auth_check in ./nodejs.module
Checks the given key to see if it matches a valid session.

File

./nodejs.module, line 656

Code

function nodejs_user_set_online($uid) {
  try {
    db_query('INSERT INTO {nodejs_presence} (uid, login_time) VALUES (:uid, :login_time)', array(
      ':uid' => $uid,
      ':login_time' => time(),
    ));
  } catch (Exception $e) {
  }
}