[wp-trac] [WordPress Trac] #20824: current_user_can() bug with Super Admin
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 4 12:04:27 UTC 2012
#20824: current_user_can() bug with Super Admin
--------------------------------+------------------------------
Reporter: abdessamad idrissi | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 3.3.2
Severity: normal | Resolution:
Keywords: |
--------------------------------+------------------------------
Changes (by scribu):
* milestone: => Awaiting Review
Comment:
I updated the codex page.
From WP_User::has_cap():
{{{
// Multisite super admin has all caps by definition,
Unless specifically denied.
if ( is_multisite() && is_super_admin( $this->ID ) ) {
if ( in_array('do_not_allow', $caps) )
return false;
return true;
}
}}}
`current_user_can('contributor')` usually works only because role names
are mangled up with capability names. We should update the inline docs.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20824#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list