# Engine::revoke()

Take back the points a reference earned (a deleted post, a removed reaction, an ended friendship).

Every live award recorded for `$ref`, and for anything beneath it (`sk_post:34` also covers `sk_post:34:comment:9`),
gets a matching negative ledger row and is taken off the member's balance, which never drops below zero. Awards made
before references were recorded cannot be matched and stay. An award is taken back at most once.

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

## Parameters

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

## Return

`int` Points taken back in total, as a positive number.

## Changelog

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