[wp-trac] [WordPress Trac] #59212: Call `add_user_meta()` when adding metadata to a new user

WordPress Trac noreply at wordpress.org
Sun Aug 27 12:21:49 UTC 2023


#59212: Call `add_user_meta()` when adding metadata to a new user
-------------------------+--------------------------
 Reporter:  johnbillion  |       Owner:  johnbillion
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  6.4
Component:  Users        |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:  performance
-------------------------+--------------------------
Changes (by johnbillion):

 * owner:  (none) => johnbillion
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56478" 56478]:
 {{{
 #!CommitTicketReference repository="" revision="56478"
 Users: Call `add_user_meta()` instead of `update_user_meta()` when adding
 metadata to a new user.

 This improves the performance of inserting users as it removes one
 unnecessary `SELECT` query for every row of metadata inserted.

 Props swissspidy, spacedmonkey, johnbillion

 Fixes #59212
 }}}

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


More information about the wp-trac mailing list