mycred_update_user_balance
Description
This action allows you to execute custom actions when a users balance changes. Note that this action fires after a users balance has been updated and not before. Also no transaction details are available besides the users ID, the amount gained / lost and the point type.
Available since version 1.1
Parameters
Param | Type | Required | Description |
---|---|---|---|
$user_id |
int | No | The ID of the user. |
$current_balance |
- | No | The users “current balance” before it was adjusted. |
$amount |
- | No | The amount added or deducted from the users current balance. A positive value represents point gains while negative value represents point loss. |
$type |
string | No | The point type. |
Used By
Package | Prio. | Description |
---|---|---|
Not used by any built-in package. |
Examples
Example 1: Send admin an email when a users balance reaches 10000.