On this page
do_action( 'rest_insert_user', WP_User $user, WP_REST_Request $request, bool $creating )
Fires immediately after a user is created or updated via the REST API.
Parameters
$userWP_User-
Inserted or updated user object.
$requestWP_REST_Request-
Request object.
$creatingbool-
True when creating a user, false when updating.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php. View all references
do_action( 'rest_insert_user', $user, $request, true );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Users_Controller::create_item() wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Creates a single user. |
| WP_REST_Users_Controller::update_item() wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Updates a single user. |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_insert_user