WordPress.org

Make WordPress Core

Ticket #6940: user_level_to_caps.diff

File user_level_to_caps.diff, 997 bytes (added by filosofo, 6 years ago)
  • wp-includes/comment.php

     
    344344                $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); 
    345345        } 
    346346 
    347         if ( $userdata && ( $user_id == $post_author || $user->has_cap('level_9') ) ) { 
     347        if ( $userdata && ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) { 
    348348                // The author and the admins get respect. 
    349349                $approved = 1; 
    350350         } else { 
  • xmlrpc.php

     
    788788                do_action('xmlrpc_call', 'blogger.getUsersBlogs'); 
    789789 
    790790                set_current_user(0, $user_login); 
    791                 $is_admin = current_user_can('level_8'); 
     791                $is_admin = current_user_can('manage_options'); 
    792792 
    793793                $struct = array( 
    794794                        'isAdmin'  => $is_admin,