Opened 21 months ago
Closed 5 months ago
#18581 closed defect (bug) (wontfix)
get_user codex said thet meta_keys could be used in 'fields' - sql error
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Users | Version: | 3.2.1 |
| Severity: | trivial | Keywords: | |
| Cc: |
Description
The codex entryhttp://codex.wordpress.org/Function_Reference/get_users#Parameters said that the fields argument would accept meta_keys.
However in 3.2.1 and 3.3 using meta_keys gives a sql error.
Using normal user table fields is fine.
I have corrected the codex for now, but in case this was really intended functionality, thought I better log it too.
Attachments (1)
Change History (4)
Looking at the function, it doesn't appear that it's ever supported meta keys in the fields param, The field selected is always prefixed with the users table. It looks like the documentation is simply wrong to me.. The functions it replaced might have however accepted meta keys..
comment:2
in reply to:
↑ 1
SergeyBiryukov — 21 months ago
Replying to dd32:
The functions it replaced might have however accepted meta keys..
get_users() replaced get_users_of_blog(), however that function didn't accept meta keys either.
So should WP_User_Query be updated to allow meta keys in the fields parameter, or, now that the documentation is corrected, this ticket can be closed?

sql error