[wp-trac] [WordPress Trac] #14387: current_user_can returns false for roles "higher" than built-ins

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 22 15:28:50 UTC 2010

#14387: current_user_can returns false for roles "higher" than built-ins
 Reporter:  sbressler        |       Owner:                 
     Type:  defect (bug)     |      Status:  new            
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Role/Capability  |     Version:                 
 Severity:  normal           |    Keywords:                 

Comment(by sbressler):

 If this is not a bug, then is the only way to check current_user_can for a
 lower role and to get it to pass for a higher role to use the deprecated
 numbered levels? current_user_can('level_1') for example when you want to
 check contributor or higher. I need to avoid just assuming
 current_user_can('edit_posts') to do this check, and it seems that levels
 are the only other way to do this if the above desired (and I believe
 correct) functionality is not what WP should be doing.

Ticket URL: <http://core.trac.wordpress.org/ticket/14387#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list