#33869 closed defect (bug) (fixed)
get_user_by() should accept ID as a field
Reported by: | Shelob9 | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
get_user_by()
and WP_User::get_data_by()
which it calls accept id
but not ID
as a value for the $field
argument. This is counter-intuitive, since the DB column is "ID" not "id". I am attaching a patch to allow passing "ID", without breaking the use of "id".
Attachments (1)
Change History (5)
#2
@
9 years ago
- Milestone changed from Awaiting Review to 4.4
Thanks for the patch. I'll write a unit test and clean up the documentation.
#3
@
9 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 34125:
This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.
9 years ago
Note: See
TracTickets for help on using
tickets.
+1 for consistency