You are here

function exif_custom_get_user_default in EXIF Custom 7

Load a user's custom settings ID.

3 calls to exif_custom_get_user_default()
exif_custom_get_mapping in ./exif_custom.module
Load a mapping for the current user, or the default if not set.
exif_custom_mappings in ./exif_custom.pages.inc
Main mappings page.
exif_custom_settings_form_user in ./exif_custom.user.inc
User settings form.

File

./exif_custom.module, line 104
Primary hook implementations for EXIF Custom.

Code

function exif_custom_get_user_default() {
  global $user;
  $mid = db_query('SELECT mid FROM {exif_custom_users} WHERE uid = :uid', array(
    ':uid' => $user->uid,
  ))
    ->fetchField();
  if (!empty($mid)) {
    return $mid;
  }
  else {
    return '';
  }
}