apply_filters( 'wp_pre_insert_user_data', array $data , bool $update , int|null $user_id , array $userdata )
Filters user data before the record is created or updated.
Description
It only includes data in the users table, not any user metadata.
Parameters
- $data
-
Values and keys for the user.<br>
- 'user_login'
(string) The user's login. Only included if $update == false - 'user_pass'
(string) The user's password.<br> - 'user_email'
(string) The user's email.<br> - 'user_url'
(string) The user's url.<br> - '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.<br> - 'user_registered'
(string) MySQL timestamp describing the moment when the user registered. Defaults to the current UTC timestamp.<br>
- 'user_login'
- $update
-
Whether the user is being updated rather than created.
- $user_id
-
ID of the user to be updated, or NULL if the user is being created.
- $userdata
-
The raw array of data passed to wp_insert_user().
Source
File: wp-includes/user.php
Changelog
Version | Description |
---|---|
5.8.0 | The $userdata parameter was added. |
4.9.0 | |
CP-2.3.0 The user's password is now hashed using bcrypt instead of phpass. | Introduced. CP-2.3.0 The user's password is now hashed using bcrypt instead of phpass. |