Make WordPress Core

Ticket #20846: 20846.2.patch

File 20846.2.patch, 1.3 KB (added by SergeyBiryukov, 12 years ago)
  • wp-comments-post.php

     
    5555// If the user is logged in
    5656$user = wp_get_current_user();
    5757if ( $user->exists() ) {
     58        if ( is_multisite() && ! is_user_member_of_blog() )
     59                wp_die( __('Sorry, you are not allowed to post comments on this site.') );
    5860        if ( empty( $user->display_name ) )
    5961                $user->display_name=$user->user_login;
    6062        $comment_author       = $wpdb->escape($user->display_name);
  • wp-includes/class-wp-xmlrpc-server.php

     
    26322632                if ( !$user ) {
    26332633                        $logged_in = false;
    26342634                        if ( $allow_anon && get_option('comment_registration') )
    2635                                 return new IXR_Error( 403, __( 'You must be registered to comment' ) );
     2635                                return new IXR_Error( 403, __( 'Sorry, you must be logged in to post a comment.' ) );
    26362636                        else if ( !$allow_anon )
    26372637                                return $this->error;
    26382638                } else {
     2639                        if ( is_multisite() && ! is_user_member_of_blog() )
     2640                                return new IXR_Error( 403, __( 'Sorry, you are not allowed to post comments on this site.' ) );
    26392641                        $logged_in = true;
    26402642                }
    26412643