Introduce get_super_admins(). Allow hard-coding a global super_admins array and bypassing site options. fixes #12815

git-svn-id: http://svn.automattic.com/wordpress/trunk@14206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2010-04-23 20:34:03 +00:00
parent 59589f6dc4
commit bc0947b075
5 changed files with 40 additions and 7 deletions

View File

@@ -531,7 +531,7 @@ switch ( $_GET['action'] ) {
case 'spam':
$user = new WP_User( $val );
if ( in_array( $user->user_login, get_site_option( 'site_admins', array( 'admin' ) ) ) )
if ( in_array( $user->user_login, get_super_admins() ) )
wp_die( sprintf( __( 'Warning! User cannot be modified. The user %s is a network admnistrator.' ), esc_html( $user->user_login ) ) );
$userfunction = 'all_spam';