#53110 closed enhancement (fixed)
Pass `$userdata` to the actions and filters in `wp_insert_user()`
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Users | Keywords: | has-patch needs-dev-note |
Focuses: | Cc: |
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.
4 years ago
#1
- Keywords has-patch added; needs-patch removed
#2
@
4 years ago
+1 for this proposal. Just figured it out while I was working on #53109.
The PR looks good to me :)
johnbillion commented on PR #1212:
4 years ago
#6
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/53110