Changeset 21413 for trunk/wp-includes/comment.php
- Timestamp:
- 08/03/2012 01:06:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r21186 r21413 651 651 do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt ); 652 652 653 if ( isset($user_id) && $user_id) { 654 $userdata = get_userdata($user_id); 655 $user = new WP_User($user_id); 653 if ( ! empty( $user_id ) ) { 654 $user = get_userdata( $user_id ); 656 655 $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); 657 656 } 658 657 659 if ( isset($userdata)&& ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) {658 if ( $user && ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) { 660 659 // The author and the admins get respect. 661 660 $approved = 1;
Note: See TracChangeset
for help on using the changeset viewer.