[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 5 11:49:22 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: Awaiting Review
Component: Users | Version: 4.6.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
This is a follow-up to #22993.
wp_get_users_with_no_role() doesn't work properly when there is and custom
role eg. role name is "admin_www" and display name is "Admin WWW",
function generates query:
{{{
SELECT user_id FROM wp_usermeta WHERE meta_key = 'wp_capabilities' AND
meta_value NOT REGEXP
'Author|Contributor|Subscriber|Redaktor|Administrator|AdminWWW'
}}}
query should be build based on role name not display name.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38234>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list