Opened 15 years ago
Closed 15 years ago
#16045 closed defect (bug) (fixed)
wp_dropdown_users() omits current user if current user no longer has posting privileges
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.1 | Priority: | high |
| Severity: | critical | Version: | 3.1 |
| Component: | Administration | Keywords: | |
| Focuses: | Cc: |
Description
in 3.1, #4458 was regressed. wp_dropdown_users() no longer includes the current author if they lack privileges.
I'm patching.
Attachments (2)
Change History (9)
#3
@
15 years ago
Aaron: If no other WHERE exists, you'll end up with ( ) OR ... when using include. The 1=1 solves that syntax issue.
#4
@
15 years ago
nacin: You could put the ( '' != $this->query_where ) check in there if needed.
It's not a huge deal...it just annoys me to see a bunch of WHERE 1=1 in my logs everywhere.
#5
@
15 years ago
include is an AND in all other get_*() funcs. Maybe we should leave get_users() as is and fix this with a tweak to wp_dropdown_users().
Note: See
TracTickets for help on using
tickets.
I know the
WHERE 1=1doesn't affect the query at all, but is it really annoying to anyone else? Is there any disadvantage to doing something like this instead?$this->query_where = ''; ... if ( '' != $this->query_where ) { $this->query_where = 'WHERE ' . $this->query_where; }