[wp-trac] [WordPress Trac] #38234: wp_get_users_with_no_role() generates query based on role display names not role name
WordPress Trac
noreply at wordpress.org
Wed Oct 12 23:26:30 UTC 2016
#38234: wp_get_users_with_no_role() generates query based on role display names not
role name
-------------------------------------------------+-------------------------
Reporter: szaqal21 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
Component: Users | Release
Severity: normal | Version: 4.4
Keywords: good-first-bug needs-unit-tests | Resolution:
has-patch | Focuses:
-------------------------------------------------+-------------------------
Comment (by procodewp):
Explanation for the patch:
wp_roles()->get_names() returns an array in the format:
role_name => display_role_name
wp_get_users_with_no_role() uses the array value (display name) to build
the regex, when it should use the array key (role name).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38234#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list