Whitespace and standards in get_userdata. fixes #13317.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-12 18:59:03 +00:00
parent 82082002fb
commit 0961da9244

View File

@ -103,19 +103,19 @@ if ( !function_exists('get_userdata') ) :
function get_userdata( $user_id ) {
global $wpdb;
$user_id = absint($user_id);
if ( $user_id == 0 )
$user_id = absint( $user_id );
if ( ! $user_id )
return false;
$user = wp_cache_get($user_id, 'users');
$user = wp_cache_get( $user_id, 'users' );
if ( $user )
return $user;
if ( !$user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1", $user_id)) )
if ( ! $user = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1", $user_id ) ) )
return false;
_fill_user($user);
_fill_user( $user );
return $user;
}