#53110 closed enhancement (fixed)
Pass `$userdata` to the actions and filters in `wp_insert_user()`
| Reported by: | johnbillion | Owned by: | desrosj |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.8 |
| Component: | Users | Version: | |
| Severity: | normal | Keywords: | has-patch needs-dev-note |
| Cc: | Focuses: |
Description
There are several actions and filters inside wp_insert_user() which would benefit from being able to access the raw $userdata array that's passed into the function.
One use case is extending the wp user import-csv command in WP-CLI. This command is a wrapper for wp_insert_user() but it's not possible to provide custom user meta fields because there's nowhere inside wp_insert_user() where a plugin can access the raw data array in order to add the user meta.
Change History (6)
This ticket was mentioned in PR #1212 on WordPress/wordpress-develop by johnbillion.
5 years ago
#1
- Keywords has-patch added; needs-patch removed
#2
@
5 years ago
+1 for this proposal. Just figured it out while I was working on #53109.
The PR looks good to me :)
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/53110