[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:00:36 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:
-------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => reporter-feedback


Comment:

 Hi @jaschaio, welcome to WordPress Trac! Thanks for the ticket.

 > There is a action called "user_register" that lets me do something once
 the user is created, but it doesn't let me modify the actual data the
 "wp_insert_user" function returns.

 `wp_insert_user()` does not return user data though, just user ID on
 success or a `WP_Error` object on failure.

 There are filters for individual fields and metadata, any reason they
 don't work for your use case?
 * `pre_user_login`
 * `pre_user_nicename`
 * `pre_user_url`
 * `pre_user_email`
 * `pre_user_nickname`
 * `pre_user_first_name`
 * `pre_user_last_name`
 * `pre_user_display_name`
 * `pre_user_description`
 * `insert_user_meta`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39829#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list