# clanbite_points_revoke()

Take back the points a reference earned, for example when the post that earned them is deleted.

Pass the same `points_ref` you gave `clanbite_points_award()` in its context. Awards recorded under that reference
or beneath it (`sk_post:34` also covers `sk_post:34:comment:9`) are reversed with a negative ledger row and removed from the
balance, which never drops below zero. Safe to call twice.

```php
clanbite_points_revoke( string $ref, int $user_id = 0 ): int
```

## Parameters

- `$ref` (string) Reference (`points_ref`).
- `$user_id` (int) Only take back this member's points (0 = whoever earned them).

## Return

`int` Points taken back in total.

## Changelog

| Version | Description |
| --- | --- |
| 1.4.0 | Introduced |
