[wp-trac] [WordPress Trac] #16501: 'Add Existing' button should be dependent on is_multisite

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 9 05:47:15 UTC 2011


#16501: 'Add Existing' button should be dependent on is_multisite
--------------------------+-----------------
 Reporter:  nacin         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  low           |  Milestone:  3.1
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------
 {{{
 if ( current_user_can( 'create_users' ) ) { ?>
         <a href="user-new.php" class="button add-new-h2"><?php echo
 esc_html_x( 'Add New', 'user' ); ?></a>
 <?php } elseif ( current_user_can( 'promote_users' ) ) { ?>
         <a href="user-new.php" class="button add-new-h2"><?php echo
 esc_html_x( 'Add Existing', 'user' ); ?></a>
 <?php }
 }}}

 I think there's an is_multisite() check missing on promote_users.

 Noticed this while looking into http://wordpress.org/support/topic
 /create_users-capability-not-working?replies=5. I'm going to do some more
 investigating to make sure there aren't any other inconsistencies,
 especially when a user has create_users but *not* promote_users.

 Speaking of, is there ever a time when a user should have create but not
 promote? Seems like a user with create_users should get promote_users
 automatically.

 Moving to 3.1 for my own investigation, but low priority.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16501>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list