[wp-trac] [WordPress Trac] #39829: Missing Filter before user is created within "wp_insert_user" function
WordPress Trac
noreply at wordpress.org
Fri Feb 10 05:25:20 UTC 2017
#39829: Missing Filter before user is created within "wp_insert_user" function
-------------------------------+------------------------------
Reporter: jaschaio | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 4.7.2
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by jaschaio):
Hey @SergeyBiryukov, thanks for the fast reply. I have seen the other
filters, but there is still no filter for the USER ID.
As I explained: Within the "wp_insert_post_data" function you have the
ability to filter through all the $data array. That means that you can
modify the $data['ID'] and assign a different one before the post gets
actually inserted into the database.
The "wp_insert_user" function seems to work different, as it inserts the
user first based on the nickname and than works with the ID returned by
the database going forward. Meaning that I can't hook anywhere to change
the ID of the to be created user.
I just wondered why there are filters available for every other field of
the user, but not for the ID. Especially if its possible within the
"wp_insert_post_data" function. These two should work similar.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39829#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list