You are here

function userpoints_transaction_load in User Points 7.2

Same name and namespace in other branches
  1. 7 userpoints.module \userpoints_transaction_load()

Loads a userpoints transaction.

Parameters

$txn_id: Userpoints transaction Id.

Return value

UserpointsTransaction A loaded userpoints transaction object.

7 calls to userpoints_transaction_load()
UserpointsAdminTestCase::testAddEditPoints in ./userpoints.test
UserpointsGrantPointsTestCase::testGrantPoints in ./userpoints.test
Test basic usage of the API to create and update transactions.
UserpointsRulesTestCase::testActions in userpoints_rules/userpoints_rules.test
Test the rules actions exposed by this module.
UserpointsRulesTestCase::testEvents in userpoints_rules/userpoints_rules.test
Test the before and after events and the setter and getter callbacks.
UserpointsTransaction::getParent in ./userpoints.transaction.inc
Returns the parent transaction if there is any.

... See full list

File

./userpoints.module, line 1322

Code

function userpoints_transaction_load($txn_id, $reset = FALSE) {
  $txn_ids = !empty($txn_id) ? array(
    $txn_id,
  ) : array();
  $temp = userpoints_transaction_load_multiple($txn_ids, array(), $reset);
  return $temp ? reset($temp) : FALSE;
}