You are here

function userpoints_access_view_transaction in User Points 7

Same name and namespace in other branches
  1. 7.2 userpoints.module \userpoints_access_view_transaction()

Checks if a user has access to a transaction.

Return value

TRUE if the user has permissions to view the transaction.

1 call to userpoints_access_view_transaction()
userpoints_get_transaction_actions in ./userpoints.module
Returns a list of operations as links.
1 string reference to 'userpoints_access_view_transaction'
userpoints_menu in ./userpoints.module
Implements hook_menu().

File

./userpoints.module, line 386

Code

function userpoints_access_view_transaction($transaction) {
  if (empty($transaction->user)) {
    $account = user_load($transaction->uid);
  }
  else {
    $account = $transaction->user;
  }
  return userpoints_access_my_points($account);
}