From 6eaa3b96376d2968940b0caeb7f7a3f816ff0aaa Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 9 Apr 2010 07:17:42 +0000 Subject: [PATCH] Fix revoke_super_admin(). see #12933. git-svn-id: http://svn.automattic.com/wordpress/trunk@14042 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ms.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 44c3501253..32ccc45e54 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -831,18 +831,18 @@ function revoke_super_admin( $user_id ) { do_action( 'revoke_super_admin', $user_id ); $admin_email = get_site_option( 'admin_email' ); + $super_admins = get_site_option( 'site_admins', array( 'admin' ) ); $user = new WP_User( $user_id ); if ( $user->user_email != $admin_email ) { foreach ( $super_admins as $key => $username ) { if ( $username == $user->user_login ) { unset( $super_admins[$key] ); + update_site_option( 'site_admins' , $super_admins ); do_action( 'revoked_super_admin', $user_id ); break; } } } - - update_site_option( 'site_admins' , $super_admins ); } ?>