[wp-trac] [WordPress Trac] #56028: Pass the user object instead of recall get user function

WordPress Trac noreply at wordpress.org
Wed Jun 22 17:37:59 UTC 2022


#56028: Pass the user object instead of recall get user function
--------------------------------------+------------------------------
 Reporter:  pbearne                   |       Owner:  pbearne
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Users                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by pbearne):

 Replying to [comment:4 spacedmonkey]:
 > What the benefit of passing the WP_User here? The WP_User is in cache
 here, so getting it out of cache isn't that bad for performance. What
 problem are we trying to solve here.
 It is a tidy-up and gives us another way to call the function
 It came out of fixing https://core.trac.wordpress.org/ticket/53634 where
 the fix was to change what I passed to this function Been able to pass the
 use it solve having to pre-select what field to use to find the user.

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


More information about the wp-trac mailing list