function commerce_file_license_user_licenses in Commerce File 7
Load all licenses for given account
Parameters
$account: A user object.
Return value
An array of entity objects, indexed by id.
File
- includes/
commerce_file.entities.inc, line 168 - Handles file licenses and file license logs
Code
function commerce_file_license_user_licenses($account = NULL) {
global $user;
$licenses = array();
if (!isset($account)) {
$account = $user;
}
if (isset($account->uid)) {
$licenses = commerce_file_license_load_multiple(FALSE, array(
'uid' => $account->uid,
));
}
return $licenses;
}