]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/users.php
Wordpress 3.3.1
[autoinstalls/wordpress.git] / wp-admin / users.php
index f124b9ca912e684fd65fe0735982c364c77a86d0..5fefb4276ef3526e90b46d79a908307c27daf3c9 100644 (file)
@@ -100,10 +100,11 @@ case 'promote':
 
                if ( ! current_user_can('promote_user', $id) )
                        wp_die(__('You can’t edit that user.'));
-               // The new role of the current user must also have the promote_users cap or be a super admin
-               if ( $id == $current_user->ID && ! is_super_admin() && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users') ) {
-                       $update = 'err_admin_role';
-                       continue;
+               // The new role of the current user must also have the promote_users cap or be a multisite super admin
+               if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users')
+                       && ! ( is_multisite() && is_super_admin() ) ) {
+                               $update = 'err_admin_role';
+                               continue;
                }
 
                // If the user doesn't already belong to the blog, bail.