More int casting, just to be safe.

git-svn-id: https://develop.svn.wordpress.org/trunk@5037 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-03-14 07:40:56 +00:00
parent d3578ce12e
commit 51fcbe01ba
1 changed files with 1 additions and 0 deletions

View File

@ -9,6 +9,7 @@ function get_profile($field, $user = false) {
function get_usernumposts($userid) {
global $wpdb;
$userid = (int) $userid;
return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_type = 'post' AND post_status = 'publish'");
}