[wp-trac] [WordPress Trac] #40545: Add hook for wp_insert_user

WordPress Trac noreply at wordpress.org
Thu Jun 22 03:25:28 UTC 2017


#40545: Add hook for wp_insert_user
-------------------------------------+-----------------------------
 Reporter:  DaveFX                   |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  4.9
Component:  Users                    |     Version:  4.8
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  administration
-------------------------------------+-----------------------------
Changes (by boonebgorges):

 * milestone:  Awaiting Review => 4.9


Comment:

 Hi @DaveFX - Thanks very much for the updated patch.

 It seems to me that the filter would be a bit easier to work with if the
 user `ID` were passed to it. I know that the `ID` is available only in the
 case of `$update`, and I know that `ID` can generally be inferred from
 `$user_login` etc, but it seems good practice to pass this info along when
 available. Since it's not part of the array of data that's actually used
 in the SQL query, perhaps it could be another filter parameter? What do
 you think?

 Regarding the hook name - I see that you changed it due to a conversation
 with @rachelbaker. Was it in Slack? I'd like to see what she had to say.
 The hook name seems fine to me, though in the case of posts we call it
 `wp_insert_post_data`, without `_pre_`.

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


More information about the wp-trac mailing list