Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#43026 closed defect (bug) (duplicate)

Deprecated feature still used in WP User Query.

Reported by: kennithnichol Owned by:
Priority: normal Milestone:
Component: Role/Capability Version:
Severity: normal Keywords:
Cc: Focuses: ui, administration

Description

Today we noticed that our Editor users were not listed in the "Authors" drop down on the post editor.

Looking at the wp_usermeta table revealed that Editors have the proper capabilities; however, their user_level was set to 0. Now, it is likely by accident that all editors were set to level_0. The point is that the Author drop down still relies on this deprecated feature to produce its list.

The code found in class-wp-user-query.php on line 323 clearly makes use of the user_level value.

$who_query = array(
        'key'     => $wpdb->get_blog_prefix( $blog_id ) . 'user_level',
        'value'   => 0,
        'compare' => '!=',
);

Shouldn't this be updated to use a user_role based filter, since that is the primary means by which user roles are assigned now?

Change History (1)

#1 @swissspidy
9 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed
  • Version trunk

Hey there,

We're already working on this in #16841. It's quite an old bug.

Note: See TracTickets for help on using tickets.