Make WordPress Core

Ticket #1698: pluggable-functions.php.diff

File pluggable-functions.php.diff, 1.1 KB (added by ringmaster, 19 years ago)

Patch to use new caps structure for user data in this function.

  • pluggable-functions.php

     
    222222        $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
    223223        $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
    224224
    225         if ('' == $user->user_email) return false; // If there's no email to send the comment to
     225        $user = new WP_User($post->post_author);
    226226
     227        if ('' == $user->data->user_email) return false; // If there's no email to send the comment to
     228
    227229        $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
    228230
    229231        $blogname = get_settings('blogname');
     
    271273        $subject = apply_filters('comment_notification_subject', $subject);
    272274        $message_headers = apply_filters('comment_notification_headers', $message_headers);
    273275
    274         @wp_mail($user->user_email, $subject, $notify_message, $message_headers);
     276        @wp_mail($user->data->user_email, $subject, $notify_message, $message_headers);
    275277   
    276278        return true;
    277279}