You are here

function user_get_by_uuid in Universally Unique IDentifier 6

Returns the user associated with a UUID.

Return value

Either the $account object, or FALSE on failure.

File

./uuid.module, line 246
Main module functions for the uuid module.

Code

function user_get_by_uuid($uuid) {
  $uid = db_result(db_query("SELECT uid FROM {uuid_users} WHERE uuid = '%s'", $uuid));
  if ($uid) {
    return user_load(array(
      'uid' => $uid,
    ));
  }
  else {
    return FALSE;
  }
}