[wp-trac] [WordPress Trac] #54984: wp_update_user doesn't work properly with current user instance
WordPress Trac
noreply at wordpress.org
Mon May 2 00:41:11 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:
--------------------------+---------------------
Changes (by peterwilsoncc):
* milestone: 6.0 => 6.1
Comment:
Replying to [comment:5 dd32]:
> So perhaps [attachment:"54984.diff"] is indeed the ideal way forward.
>
> > 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().
>
> Correct me if I'm wrong, but in those cases, this could've previously
been an issue too, right?
Reviewing the code, yes. `new WP_User()` is called directly fairly
frequently so one more call won't make a difference.
As RC1 is later this week, I'll move this to the 6.1 milestone to be
actioned during the next cycle.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54984#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list