#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 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.9.1 |
Component: | Login and Registration | Keywords: | |
Focuses: | docs | Cc: |
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.
10 years ago
#4
follow-up:
↓ 5
@
9 years ago
- Owner set to DrewAPicture
- Resolution set to fixed
- Status changed from new to closed
In 33687:
#5
in reply to:
↑ 4
;
follow-up:
↓ 6
@
9 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
@
9 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.
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.