Ticket #21120: 21120.2.patch
File 21120.2.patch, 497 bytes (added by , 12 years ago) |
---|
-
wp-includes/pluggable.php
diff --git wp-includes/pluggable.php wp-includes/pluggable.php index ac308a9..464c5f9
function get_user_by( $field, $value ) { 138 138 if ( !$userdata ) 139 139 return false; 140 140 141 $user = wp_cache_get( $userdata->ID, 'users' ); 142 143 if ( !empty( $user ) && !empty( $user->caps ) ) 144 return $user; 145 141 146 $user = new WP_User; 142 147 $user->init( $userdata ); 143 148 149 wp_cache_set( $userdata->ID, $user, 'users' ); 144 150 return $user; 145 151 } 146 152 endif;