#29120 closed defect (bug) (fixed)
user.php inconsistency between _get_additional_user_keys() and wp_insert_user() regarding first_name and last_name
| Reported by: | martha_camellia | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Login and Registration | Version: | 3.9.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | docs |
Description
file: wp/wp-includes/user.php
Found while trying to use user_register action on new account creation.
According to the code comment, function _get_additional_user_keys() does this: "Return a list of meta keys that wp_insert_user() is supposed to set." Included in it's return data are "first_name" and "last_name". However, the wp_insert_user() function does not set those values, although it does use them.
I am not sure whether wp_insert_user() is supposed to set first_name and last_name or not. Wish it would :-)
Change History (7)
This ticket was mentioned in Slack in #core by jorbin. View the logs.
11 years ago
#5
in reply to: ↑ 4
;
follow-up:
↓ 6
@
11 years ago
Replying to DrewAPicture:
That description right now is not clear enough and I think that you made some mistake. Right now:
Values actually keys returned via this function are dependent on the presence of those keys in the user meta data.
Maybe something like this:
Values that are returned via this function are dependent on the presence of those keys in the user meta data.
#6
in reply to: ↑ 5
@
11 years ago
Replying to dimadin:
Replying to DrewAPicture:
That description right now is not clear enough and I think that you made some mistake. Right now:
Values actually keys returned via this function are dependent on the presence of those keys in the user meta data.
Maybe something like this:
Values that are returned via this function are dependent on the presence of those keys in the user meta data.
Yep. Typo. Good catch.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the report martha_camellia and sorry it took so long for someone to respond.
I think we should clarify the documentation of
_get_additional_user_keys()to make it clear that some of the user data may be empty based on what has previously been set.