Ticket #12888: 12888.patch
| File 12888.patch, 1.4 KB (added by , 16 years ago) |
|---|
-
wp-admin/includes/user.php
79 79 $potential_role = isset($wp_roles->role_objects[$new_role]) ? $wp_roles->role_objects[$new_role] : false; 80 80 // Don't let anyone with 'edit_users' (admins) edit their own role to something without it. 81 81 // Multisite super admins can freely edit their blog roles -- they possess all caps. 82 if ( ( is_multisite() && is_s ite_admin() ) || $user_id != $current_user->id || ($potential_role && $potential_role->has_cap( 'edit_users' ) ) )82 if ( ( is_multisite() && is_super_admin() ) || $user_id != $current_user->id || ($potential_role && $potential_role->has_cap( 'edit_users' ) ) ) 83 83 $user->role = $new_role; 84 84 85 85 // If the new role isn't editable by the logged-in user die with error -
wp-includes/ms-deprecated.php
101 101 * @deprecated Use $GLOBALS['current_user']->ID 102 102 */ 103 103 function get_current_user_id() { 104 _deprecated_function( __FUNCTION__, '3.0', '$GLOBALS \'current_user\']->ID' );104 _deprecated_function( __FUNCTION__, '3.0', '$GLOBALS[\'current_user\']->ID' ); 105 105 return $GLOBALS['current_user']->ID; 106 106 } 107 107