You are here

function drd_server_get_account_by_session in Drupal Remote Dashboard Server 6

Same name and namespace in other branches
  1. 7 drd_server.module \drd_server_get_account_by_session()
2 calls to drd_server_get_account_by_session()
drd_server_check_session in ./drd_server.module
drd_server_load_user in ./drd_server.module
Get the user from the given session and check permission

File

./drd_server.module, line 58

Code

function drd_server_get_account_by_session($sid) {
  try {
    $account = db_fetch_object(db_query("SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = '%s'", $sid));
  } catch (Exception $e) {
  }
  return $account;
}