You are here

function userpoints_action_grant_points in User Points 6

Same name and namespace in other branches
  1. 5.3 userpoints_workflow_ng.module \userpoints_action_grant_points()
  2. 7.2 userpoints_rules/userpoints_rules.rules.inc \userpoints_action_grant_points()
  3. 7 userpoints_rules.rules.inc \userpoints_action_grant_points()

Rules action - grant points to a user.

File

./userpoints_rules.rules.inc, line 57
Provide better integration into the rules module

Code

function userpoints_action_grant_points($account, $settings) {
  userpoints_userpointsapi(array(
    'uid' => $account->uid,
    'points' => $settings['points'],
    'tid' => $settings['tid'],
    'entity_type' => $settings['entity_type'],
    'entity_id' => $settings['entity_id'],
    'description' => $settings['description'],
    'operation' => $settings['operation'],
  ));
}