Prev |  | Next

## 3.12. Moderation

### 3.12.1. email_user_start

This hook is put at the very beginning of `phorum_email_user()` and is therefore called for every email that is sent from Phorum. It is put before every replacement done in that function so that all data which is sent to that function can be replaced/changed at will.

Call time:

In the file `email_functions.php` at the start of `phorum_email_user()`, before any modification of data.

Hook input:

An array containing:

- An array of addresses.
- An array containing the message data.

Hook output:

Same as input.

Example code:

    function phorum_mod_foo_email_user_start (list($addresses, $data))
    {
        global $PHORUM;

        // Add our disclaimer to the end of every email message.
        $data["mailmessage"] = $PHORUM["mod_foo"]["email_disclaimer"];

        return array($addresses, $data);
    }

Prev | Up | Next
| Home |