mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 15:14:37 +00:00
Don't return data for user 1 when passed in junk like an array. See #13317.
git-svn-id: https://develop.svn.wordpress.org/trunk@14695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -103,10 +103,13 @@ if ( !function_exists('get_userdata') ) :
|
||||
function get_userdata( $user_id ) {
|
||||
global $wpdb;
|
||||
|
||||
if ( ! is_numeric( $user_id ) )
|
||||
return false;
|
||||
|
||||
$user_id = absint( $user_id );
|
||||
if ( ! $user_id )
|
||||
return false;
|
||||
|
||||
|
||||
$user = wp_cache_get( $user_id, 'users' );
|
||||
|
||||
if ( $user )
|
||||
|
||||
Reference in New Issue
Block a user