﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
19769	$userdata is not empty for anonymous requests	MattyRob	nacin	"When an anonymous user visit a WordPress 3.3.x installation (i.e. a user who has not logged in) the $userdata global variable is set but virtually unpopulated.

In previous versions of WordPress (3.2.1 checked) the $userdata variable returns NULL. In the 3.3 branch it returns the following:

{{{
object(WP_User)#251 (7) {
  [""data""]=>
  NULL
  [""ID""]=>
  int(0)
  [""caps""]=>
  array(0) {
  }
  [""cap_key""]=>
  NULL
  [""roles""]=>
  array(0) {
  }
  [""allcaps""]=>
  array(0) {
  }
  [""filter""]=>
  NULL
}
}}}

Is this expected behaviour? I would have though $userdata should be NULL for visits from users who are not logged in.

I tested with this simple plugin:

{{{
function ud_check() {
	global $userdata;
	var_dump($userdata);
}

add_action('shutdown', 'ud_check');
}}}"	defect (bug)	closed	normal	3.3.2	Users	3.3.1	normal	fixed	has-patch dev-feedback	
