3.16.5. user_delete

Modules can use this hook to run some additional user cleanup tasks or or to keep some external system in sync with the Phorum user data.

Call time:

Just before a user is deleted.

Hook input:

The user_id of the user that will be deleted.

Hook output:

The same user_id as the one that was used for the hook call argument.

Example code:

function phorum_mod_foo_user_delete($user_id)
{
    // Get user info
    $user = phorum_api_user_get($user_id);

    // Log user delete through syslog.
    openlog("Phorum", LOG_PID | LOG_PERROR, LOG_LOCAL0);
    syslog(LOG_NOTICE, "Delete user registration: $user[username]");

    return $user_id;
}