Prev |  | Next

### 3.16.7. after_register

This hook can be used for performing tasks (like logging and notification) after a successful user registration.

Call time:

In `register.php`, right after a successful registration of a new user is done and all confirmation mails are sent.

Hook input:

An array containing the user data of the newly registered user (read-only).

Hook output:

None

Example code:

    function phorum_mod_foo_after_register($data)
    {
        global $PHORUM;

        // Keep a log of user registrations by user id with
        // the IP address of the computer they used to
        // register
        $PHORUM["mod_foo"]["user_registrations"][$userdata["user_id"]] = $_SERVER["REMOTE_ADDR"];

        phorum_db_update_settings(array("mod_foo" => $PHORUM["mod_foo"]));
    }

Prev | Up | Next
| Home |