[wp-trac] [WordPress Trac] #53131: Disjunctive normal form for WP_User::has_cap
WordPress Trac
noreply at wordpress.org
Sun May 2 15:43:02 UTC 2021
#53131: Disjunctive normal form for WP_User::has_cap
-----------------------------+------------------------------
Reporter: manfcarlo | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by joyously):
Can you give an example of when multiple capabilities are checked, and the
user has to have all of them to pass the check?
Your proposed code would fail on the second set because the boolean is
still the value from the previous set (assuming data of the first set
doesn't match but second does).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53131#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list