Add AND. fixes #4101
git-svn-id: https://develop.svn.wordpress.org/trunk@5194 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
627cf79932
commit
993b6f231c
@ -10,7 +10,7 @@ function get_profile($field, $user = false) {
|
|||||||
function get_usernumposts($userid) {
|
function get_usernumposts($userid) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$userid = (int) $userid;
|
$userid = (int) $userid;
|
||||||
return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_type = 'post' " . get_private_posts_cap_sql('post'));
|
return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_type = 'post' AND " . get_private_posts_cap_sql('post'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: xmlrpc only. Maybe move to xmlrpc.php.
|
// TODO: xmlrpc only. Maybe move to xmlrpc.php.
|
||||||
|
Loading…
Reference in New Issue
Block a user