You are here

function _uc_file_user_get in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 uc_file/uc_file.module \_uc_file_user_get()
  2. 7.3 uc_file/uc_file.module \_uc_file_user_get()

Retrieves a file_user object by user and fid.

3 calls to _uc_file_user_get()
uc_file_action_order_renew in uc_file/uc_file.ca.inc
Renews an orders product files.
uc_file_add_to_cart in uc_file/uc_file.module
Implements hook_add_to_cart().
uc_file_user_renew in uc_file/uc_file.module
Adds a file (or files) to a user's list of downloadable files, accumulating limits.

File

uc_file/uc_file.module, line 1769

Code

function _uc_file_user_get($user, $fid) {
  $file_user = db_fetch_object(db_query("SELECT * FROM {uc_file_users} WHERE uid = %d AND fid = %d", $user->uid, $fid));
  if ($file_user) {
    $file_user->addresses = unserialize($file_user->addresses);
  }
  return $file_user;
}