[wp-trac] [WordPress Trac] #20824: current_user_can() bug with Super Admin

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 4 11:38:45 UTC 2012


#20824: current_user_can() bug with Super Admin
--------------------------------+-----------------------
 Reporter:  abdessamad idrissi  |       Owner:
     Type:  defect (bug)        |      Status:  reopened
 Priority:  normal              |   Milestone:
Component:  Users               |     Version:  3.3.2
 Severity:  normal              |  Resolution:
 Keywords:                      |
--------------------------------+-----------------------
Changes (by abdessamad idrissi):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 But in
 [http://codex.wordpress.org/Function_Reference/current_user_can#Parameters
 the codex];[[BR]]

 ''...this function accepts capability or role name.''[[BR]]

 The same thing is stated in the
 [http://core.trac.wordpress.org/browser/tags/3.3.2/wp-
 includes/capabilities.php#L1183 wp-includes/capabilities.php][[BR]]

 So what to believe?

 I don't want to check if user is super admin, I want to check if the user
 is contributor. Of course there's other techniques to make this happen but
 I just wanted to report a bug in this function as it fails when it comes
 to super admins.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20824#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list