Prev |  | Next

## 3.5. Private message system

### 3.5.1. pm_list

(Phorum 5 >= 5.2.7)

This hook can be used for reformatting a list of private messages.

Call time:

Right after Phorum has formatted the private message list. This is primarily done when a list of private messages is shown in the private message system.

Hook input:

An array of private message info arrays.

Hook output:

The same array as was used for the hook call argument, possibly with some updated fields in it.

Example code:

    function phorum_mod_foo_pm_list($messages)
    {
        // Filter out private messages that are sent by
        // evil user X with user_id 666.
        foreach ($messages as $id => $message) {
            if ($message['user_id'] == 666) {
                unset($messages[$id]);
            }
        }
        return $messages;
    }

Prev | Up | Next
| Home |