Function __global->points_debit_member

Definitions

sources/points2.php

  • Debit points from a member to the system.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: int

Parameters

Name Type Default Set Range Description
$member_id MEMBER required parameter N/A N/A The member to debit
$reason SHORT_TEXT required parameter N/A N/A The reason for this debit in the logs
$total_points integer required parameter N/A N/A The total points to debit (including gift points when applicable)
$amount_gift_points ?integer 0 N/A N/A The number of $total_points that should be debited from the gift points balance (null: use as many gift points as is available)
$anonymous BINARY 0 N/A N/A Whether this transaction should be anonymous
$send_notifications ?boolean True N/A N/A Whether to send notifications for this transaction (false: only the staff get it) (true: both the member and staff get it) (null: neither the member nor staff get it)
$locked BINARY 0 N/A N/A Whether this transaction is irreversible
$t_type ID_TEXT Blank (empty string) N/A N/A An identifier to relate this transaction with other transactions of the same $type (e.g. content type)
$t_subtype ID_TEXT Blank (empty string) N/A N/A An identifier to relate this transaction with other transactions of the same $type and $subtype (e.g. an action performed on the $type)
$t_type_id ID_TEXT Blank (empty string) N/A N/A Some content or row ID of the specified $type
$time ?TIME Null N/A N/A The time this transaction occurred (null: now)
$force boolean False N/A N/A Whether to force this debit to occur even if the member does not have enough points
$is_ranked boolean False N/A N/A Whether the points should also be removed from the member's rank points; unlike other APIs, this is false by default as most debits are purchases

Return

  • The ID of the point transaction (null: no transaction took place)
  • Type: ?AUTO_LINK
  • Set: N/A
  • Range: N/A