Opened 16 years ago
Closed 16 years ago
#16045 closed defect (bug) (fixed)
wp_dropdown_users() omits current user if current user no longer has posting privileges
| Reported by: | markjaquith | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 3.1 |
| Component: | Administration | Version: | 3.1 |
| Severity: | critical | Keywords: | |
| Cc: | Focuses: |
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
@
16 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
@
16 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
@
16 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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; }