You are here

function _biblio_get_cid_from_md5 in Bibliography Module 6.2

Retrieves a contributor ID value based on md5 hash value.

// @todo: What is returned if no match found for md5 hash string?

Parameters

string $md5: A md5 hash string.

Return value

integer Integer ID of a contributor.

File

includes/biblio.contributors.inc, line 779
Functions related to contributors in Drupal biblio module.

Code

function _biblio_get_cid_from_md5($md5) {
  $cid = db_result(db_query("SELECT cid FROM {biblio_contributor_data} WHERE md5='%s'", $md5));
  if (!$cid) {
    $cid = db_result(db_query("SELECT aka FROM {biblio_contributor_aka_data} WHERE md5='%s'", $md5));
  }
  return $cid;
}