VOOZH about

URL: https://developer.wordpress.org/reference/hooks/wp_pre_insert_user_data/

⇱ wp_pre_insert_user_data – Hook | Developer.WordPress.org


Skip to content

WordPress Developer Resources

wp_pre_insert_user_data

HomeReferenceHookswp_pre_insert_user_data

apply_filters( ‘wp_pre_insert_user_data’, , , ,  )

Filters user data before the record is created or updated.

Description

It only includes data in the users table, not any user metadata.

Parameters

$dataarray
Values and keys for the user.
  • user_login string
    The user’s login. Only included if $update == false
  • user_pass string
    The user’s password.
  • user_email string
    The user’s email.
  • user_url string
    The user’s url.
  • user_nicename string
    The user’s nice name. Defaults to a URL-safe version of user’s login.
  • display_name string
    The user’s display name.
  • user_registered string
    MySQL timestamp describing the moment when the user registered. Defaults to the current UTC timestamp.
$updatebool
Whether the user is being updated rather than created.
$user_idint|null
ID of the user to be updated, or NULL if the user is being created.
$userdataarray
The raw array of data passed to wp_insert_user() .

Source

$data = apply_filters( 'wp_pre_insert_user_data', $data, $update, ( $update ? $user_id : null ), $userdata );

View all references View on Trac View on GitHub

Related

Used byDescription
wp_insert_user()wp-includes/user.php

Inserts a user into the database.

Changelog

VersionDescription
6.8.0The user’s password is now hashed using bcrypt by default instead of phpass.
5.8.0The $userdata parameter was added.
4.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.