You are here

function nodejs_auth_check_callback in Node.js integration 7

Same name and namespace in other branches
  1. 8 nodejs.module \nodejs_auth_check_callback()

Default Node.js auth check callback implementation.

2 string references to 'nodejs_auth_check_callback'
nodejs_auth_check in ./nodejs.module
Checks the given key to see if it matches a valid session.
nodejs_uninstall in ./nodejs.install
Implements hook_uninstall().

File

./nodejs.module, line 627

Code

function nodejs_auth_check_callback($auth_token) {
  $sql = "SELECT uid FROM {sessions} WHERE MD5(sid) = :auth_key OR MD5(ssid) = :auth_key";
  return db_query($sql, array(
    ':auth_key' => $auth_token,
  ))
    ->fetchField();
}