From f609d0c8a3e596b79122d5cc8e6ae775ef284744 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 7 Apr 2010 15:28:10 +0000 Subject: [PATCH] User is_super_admin(). Props ocean90. fixes #12888 git-svn-id: http://svn.automattic.com/wordpress/trunk@14032 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/user.php | 2 +- wp-includes/ms-deprecated.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 379dcd4fd..1aa3c35ae 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -79,7 +79,7 @@ function edit_user( $user_id = 0 ) { $potential_role = isset($wp_roles->role_objects[$new_role]) ? $wp_roles->role_objects[$new_role] : false; // Don't let anyone with 'edit_users' (admins) edit their own role to something without it. // Multisite super admins can freely edit their blog roles -- they possess all caps. - if ( ( is_multisite() && is_site_admin() ) || $user_id != $current_user->id || ($potential_role && $potential_role->has_cap( 'edit_users' ) ) ) + if ( ( is_multisite() && is_super_admin() ) || $user_id != $current_user->id || ($potential_role && $potential_role->has_cap( 'edit_users' ) ) ) $user->role = $new_role; // If the new role isn't editable by the logged-in user die with error diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index 12d8056a6..d99ae9b1d 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -101,7 +101,7 @@ endif; * @deprecated Use $GLOBALS['current_user']->ID */ function get_current_user_id() { - _deprecated_function( __FUNCTION__, '3.0', '$GLOBALS\'current_user\']->ID' ); + _deprecated_function( __FUNCTION__, '3.0', '$GLOBALS[\'current_user\']->ID' ); return $GLOBALS['current_user']->ID; }