Prev |  | Next

### 3.15.2. user_register

This hook is called when a user registration is completed by setting the status for the user to PHORUM_USER_ACTIVE. This hook will not be called right after filling in the registration form (unless of course, the registration has been setup to require no verification at all in which case the user becomes active right away).

Call time:

Right after a new user registration becomes active.

Hook input:

An array containing user data for the registered user.

Hook output:

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

Example code:

    function phorum_mod_foo_user_register($user)
    {
        // Log user registrations through syslog.
        openlog("Phorum", LOG_PID | LOG_PERROR, LOG_LOCAL0);
        syslog(LOG_NOTICE, "New user registration: $user[username]");

        return $user;
    }

Prev | Up | Next
| Home |