[wp-trac] [WordPress Trac] #54921: wp_dropdown_users_args Filter not working in WordPress 5.9
WordPress Trac
noreply at wordpress.org
Wed Jan 26 13:52:09 UTC 2022
#54921: wp_dropdown_users_args Filter not working in WordPress 5.9
-------------------------------+------------------------------
Reporter: martin7ba | Owner: audrasjb
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 5.9
Severity: major | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by martin7ba):
Hi,
No it didn't solve the issue.
This is the query that gets executed and the result is only admin users
{{{
SELECT wp_users.ID,wp_users.user_login,wp_users.display_name FROM wp_users
INNER JOIN wp_usermeta ON ( wp_users.ID = wp_usermeta.user_id ) INNER
JOIN wp_usermeta AS mt1 ON ( wp_users.ID = mt1.user_id ) WHERE 1=1 AND (
(
(
(
(
( wp_usermeta.meta_key = 'wp_capabilities' AND
wp_usermeta.meta_value LIKE
'{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}\"edit\\_posts\"{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}'
)
OR
( wp_usermeta.meta_key = 'wp_capabilities' AND
wp_usermeta.meta_value LIKE
'{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}\"administrator\"{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}'
)
OR
( wp_usermeta.meta_key = 'wp_capabilities' AND
wp_usermeta.meta_value LIKE
'{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}\"editor\"{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}'
)
OR
( wp_usermeta.meta_key = 'wp_capabilities' AND
wp_usermeta.meta_value LIKE
'{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}\"author\"{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}'
)
OR
( wp_usermeta.meta_key = 'wp_capabilities' AND
wp_usermeta.meta_value LIKE
'{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}\"contributor\"{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}'
)
)
)
)
AND
(
(
( mt1.meta_key = 'wp_capabilities' AND mt1.meta_value LIKE
'{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}\"administrator\"{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}'
)
OR
( mt1.meta_key = 'wp_capabilities' AND mt1.meta_value LIKE
'{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}\"company\\_owner\"{2273a74d14d71bb774cb0881c3df3cfb378ca21504c79d6393cab7aa1b629bc9}'
)
)
)
)
) ORDER BY display_name ASC
}}}
Replying to [comment:1 audrasjb]:
> Hello @martin7ba and thank you for the report,
>
> WordPress 5.9 introduced some change in User Queries, as announced in
the related dev note: https://make.wordpress.org/core/2022/01/05/new-
capability-queries-in-wordpress-5-9/
>
> Please let us know if it doesn't solve your issue.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54921#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list