[wp-trac] [WordPress Trac] #54984: wp_update_user doesn't work properly with current user instance

WordPress Trac noreply at wordpress.org
Wed Sep 7 06:43:50 UTC 2022


#54984: wp_update_user doesn't work properly with current user instance
--------------------------+---------------------
 Reporter:  oztaser       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.1
Component:  Users         |     Version:  5.8
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by tykoted):

 > However, I am not sure this is an ideal solution as get_userdata() and
 related functions are pluggable so there is no way of knowing if the data
 returned by new WP_User( $user_id ) is what is returned by get_userdata().

 I would say this can be the ideal solution as well. The fix will not touch
 the `get_userdata()` which is used in other areas, so there’s no risk of
 breaking existing functionality.

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


More information about the wp-trac mailing list