Opened 16 years ago
Closed 16 years ago
#14924 closed defect (bug) (fixed)
author/user meta data extraction error
| Reported by: | iamronen | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Users | Version: | 3.0.1 |
| Severity: | major | Keywords: | user, author, meta |
| Cc: | Focuses: |
Description
It seems that if user meta data fields are created with dashes '-' then retrieval functions fail. Fields are properly stored in the database but retrieving with "get_the_author_meta" fails.
When I manually changed the field names to underscores '_' they were extracted OK. When I changes them back to dashes '-' they again failed.
Change History (4)
#2
@
16 years ago
I may be missing them - but the code you linked to seems to relate to basic user fields while I was referring to meta data (custom fields that I added) ... if it is as you say - it is an unclear and undocumented inconsistency. I would expect the two functions to behave identically.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
using get_user_meta() works as expected.
The cause here is that the User object will store 'test-key' as 'testkey' due to dashes not being allowed in class properties thanks to this code: http://core.trac.wordpress.org/browser/trunk/wp-includes/user.php#L923