You are here

function scald_uid_to_aid in Scald: Media Management made easy 6

Determine the Author ID that corresponds to a User ID.

Parameters

$uid: The Drupal User ID of the user in question. Defaults to the UID of the current user.

Return value

The Scald Author ID of the Author record that corresponds to the Drupal user in question. FALSE upon failure.

4 calls to scald_uid_to_aid()
mee_field in mee/mee.module
Implementation of hook_field().
scald_composite_nodeapi in scald_composite/scald_composite.module
Implementation of hook_nodeapi().
scald_example_content_type_get_atom in scald_example_content_type/scald_example_content_type.module
Returns an atom based on the node information.
scald_user in ./scald.module
Implementation of hook_user().

File

./scald.module, line 1829

Code

function scald_uid_to_aid($uid = NULL) {
  if (is_null($uid)) {
    global $user;
    $uid = $user->uid;
  }
  return db_result(db_query("SELECT aid FROM {scald_authors} WHERE uid = %d", $uid));
}