diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
index c2e0db83c5..355f04fa1a 100644
|
a
|
b
|
class WP_REST_Users_Controller extends WP_REST_Controller { |
| 605 | 605 | if ( is_wp_error( $user_id ) ) { |
| 606 | 606 | return $user_id; |
| 607 | 607 | } |
| | 608 | |
| | 609 | /** |
| | 610 | * Filters whether the notified of a new user registration. |
| | 611 | * |
| | 612 | * @param string $notify Type of notification that should happen. Accepts 'admin' or an empty |
| | 613 | * string (admin only), 'user', or 'both' (admin and user). Default 'admin'. |
| | 614 | * You can set 'false' to stop notification for both. |
| | 615 | * @param int $user_id User ID. |
| | 616 | * |
| | 617 | */ |
| | 618 | $notify = apply_filters( 'rest_wp_user_created_notification', $notify = 'admin', $user_id ); |
| | 619 | |
| | 620 | if ( $notify && $notify != 'false' ) { |
| | 621 | wp_new_user_notification( $user_id, null, $notify ); |
| | 622 | } |
| 608 | 623 | } |
| 609 | 624 | |
| 610 | 625 | $user = get_user_by( 'id', $user_id ); |