[wp-trac] [WordPress Trac] #13074: Distinguish between user deletion and removal in users.php

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 24 19:21:17 UTC 2010


#13074: Distinguish between user deletion and removal in users.php
--------------------------+-------------------------------------------------
 Reporter:  ryan          |        Owner:          
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:  3.0     
Component:  Users         |      Version:          
 Severity:  normal        |   Resolution:          
 Keywords:  has-patch     |  
--------------------------+-------------------------------------------------
Changes (by layotte):

  * keywords:  => has-patch


Comment:

 I just noticed that an adminstrator was unable to edit a user...

 According to capabilities.php:


 {{{
 case 'edit_user':
         // Allow user to edit itself
         if ( isset( $args[0] ) && $user_id == $args[0] )
                 break;
         // Fall through
 case 'edit_users':
         // If multisite these caps are allowed only for super admins.
         if ( is_multisite() && !is_super_admin() )
                 $caps[] = 'do_not_allow';
         else
                 $caps[] = $cap;
         break;
 }}}

 I changed code to link the username if "edit_users" cap check passes...
 "edit_user" was only allowing edit for self.

 I haven't tested the effect of this on MultiSite, FYI.

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


More information about the wp-trac mailing list