wp_pre_insert_user_data

FILTER wp-includes\user.php (ligne 2505) github
Filters user data before the record is created or updated. It only includes data in the users table, not any user metadata.

Paramètres

Entrée :
$data, $update, ( $update ? $user_id : null
Sortie :
@param array    $data {
@param bool     $update   Whether the user is being updated rather than created.
@param int|null $user_id  ID of the user to be updated, or NULL if the user is being created.
@param array    $userdata The raw array of data passed to wp_insert_user().

Utilisation

// Modifier la valeur avec le filtre 'wp_pre_insert_user_data'
add_filter('wp_pre_insert_user_data', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($data) {
    // Modifier la valeur
    return $data;
}

Actualités

Chargement des actualités...