[wp-trac] [WordPress Trac] #27377: profile_update action with old_user_data should include the additional_user_keys data?
WordPress Trac
noreply at wordpress.org
Fri Apr 9 11:37:08 UTC 2021
#27377: profile_update action with old_user_data should include the
additional_user_keys data?
----------------------------+-----------------------------
Reporter: joostdekeijzer | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Users | Version: 2.7
Severity: normal | Resolution:
Keywords: close | Focuses: administration
----------------------------+-----------------------------
Changes (by donmhico):
* keywords: needs-patch => close
Comment:
This ticket has been opened 7 years ago but looking at the code now (5.8)
and even here [8969]. `$old_user_data = get_userdata( $ID );` And
[https://developer.wordpress.org/reference/functions/get_userdata/
get_user_data()] returns
[https://developer.wordpress.org/reference/classes/wp_user/ WP User]. So
it's possible to get the additional user fields like so
{{{#!php
<?php
$old_user_data = get_userdata( $ID );
$old_user_data->first_name;
$old_user_data->last_name
}}}
So I don't think any changes are needed. Closing this ticket for now. Feel
free to open if I misunderstood anything.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27377#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list