Function __global->points_transact
Definitions
sources/points2.php
- Transact points from one member to another. This uses gift points where possible and if enabled.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: int
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$sending_member | MEMBER | required parameter | N/A | N/A | The ID of the member sending the points |
$receiving_member | MEMBER | required parameter | N/A | N/A | The ID of the member receiving the points |
$reason | SHORT_TEXT | required parameter | N/A | N/A | The reason for this transaction in the logs |
$total_points | integer | required parameter | N/A | N/A | The total number of points to transact (includes gift points when applicable) |
$amount_gift_points | ?integer | Null | N/A | N/A | The strict number of $total_points which should come from the sender's gift points balance (null: use as many gift points the sender has available) |
$anonymous | BINARY | 0 | N/A | N/A | Whether the sender should be hidden from those without the privilege to trace anonymous transactions |
$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 transaction to occur even if the sender does not have enough points |
$is_ranked | boolean | True | N/A | N/A | Whether the points should affect rank points for the sending member if a debit, else the reciving member |
Return
- The ID of the transaction (null: a transaction was not created)
- Type: ?AUTO_LINK
- Set: N/A
- Range: N/A