[wp-trac] [WordPress Trac] #24680: wp_dropdown_users references user_login attribute that is never set
WordPress Trac
noreply at wordpress.org
Wed Jul 3 18:57:48 UTC 2013
#24680: wp_dropdown_users references user_login attribute that is never set
--------------------------+-----------------------------
Reporter: sphoid | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 3.5.2
Severity: minor | Keywords:
--------------------------+-----------------------------
When wp_dropdown_users is called and the internal foreach loop encounters
as user with an empty value for the attribute indicated in $show it
attempts to fallback on $user->user_login to show as the option text. When
the fallback happens a php notice is triggered "Undefined property:
stdClass::$user_login". By default get_users() is called with 'fields' =
array('ID', $show) and by default $show is set to display_name so
user_login is never an attribute of the queried users unless $show is set
to user_login by some chance. I am attaching a patch that adds user_login
to the fields argument
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24680>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list