Ticket #21120: 21120.2.diff
File 21120.2.diff, 976 bytes (added by , 12 years ago) |
---|
-
wp-includes/capabilities.php
1380 1380 * @return bool True if the user is a site admin. 1381 1381 */ 1382 1382 function is_super_admin( $user_id = false ) { 1383 if ( $user_id )1383 if ( $user_id && $user_id != get_current_user_id() ) 1384 1384 $user = new WP_User( $user_id ); 1385 1385 else 1386 1386 $user = wp_get_current_user(); -
wp-includes/pluggable.php
133 133 * @return bool|object False on failure, WP_User object on success 134 134 */ 135 135 function get_user_by( $field, $value ) { 136 if ( 'id' === $field && get_current_user_id() == $value ) 137 return wp_get_current_user(); 138 136 139 $userdata = WP_User::get_data_by( $field, $value ); 137 140 138 141 if ( !$userdata )