function library_get_transactions_by_single_user in Library 7
Retrieves all transactions associated with a user.
Parameters
object $user: A user object.
Return value
null|array Array of transaction objects for a user if present.
1 call to library_get_transactions_by_single_user()
- library_history_single_user in ./
library.pages.inc - The menu callback to show the transaction history of a single user.
File
- ./
library.module, line 929
Code
function library_get_transactions_by_single_user($user) {
$select = library_get_transactions_query();
$select
->condition('lt.uid', $user->uid);
$transactions = $select
->execute()
->fetchAll();
if ($transactions) {
return $transactions;
}
else {
return NULL;
}
}