If no user is logged in, setup an empty user.

git-svn-id: https://develop.svn.wordpress.org/trunk@3299 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-12-13 03:46:40 +00:00
parent b1b88e415f
commit 5a02ae79af
2 changed files with 6 additions and 2 deletions

View File

@@ -117,6 +117,9 @@ class WP_User {
function WP_User($id) {
global $wp_roles, $table_prefix;
if ( empty($id) )
return;
if ( is_numeric($id) ) {
$this->data = get_userdata($id);
} else {