Ticket #24635: 24635.diff
File 24635.diff, 726 bytes (added by , 11 years ago) |
---|
-
wp-includes/user.php
1191 1191 * 1192 1192 * @param object $user User object to be cached 1193 1193 */ 1194 function update_user_caches($user) { 1194 function update_user_caches( $user ) { 1195 1196 if ( is_numeric( $user ) ) 1197 $user = new WP_User( $user ); 1198 1199 if ( is_a( $user, 'WP_User' ) ) { 1200 if ( ! $user->exists() ) 1201 return false; 1202 $user = $user->data; 1203 } 1204 1205 if ( ! is_object( $user ) ) 1206 return false; 1207 1195 1208 wp_cache_add($user->ID, $user, 'users'); 1196 1209 wp_cache_add($user->user_login, $user->ID, 'userlogins'); 1197 1210 wp_cache_add($user->user_email, $user->ID, 'useremail');