Ticket #20601: 20601.diff
| File 20601.diff, 602 bytes (added by , 14 years ago) |
|---|
-
wp-includes/query.php
2304 2304 } 2305 2305 $q['author_name'] = sanitize_title_for_query( $q['author_name'] ); 2306 2306 $q['author'] = get_user_by('slug', $q['author_name']); 2307 if ( $q['author'] )2307 if ( $q['author'] && is_user_member_of_blog( $q['author']->ID ) ) 2308 2308 $q['author'] = $q['author']->ID; 2309 else 2310 $q['author'] = false; 2309 2311 $whichauthor .= " AND ($wpdb->posts.post_author = " . absint($q['author']) . ')'; 2310 2312 } 2311 2313