From 2edfe299a2d2937d45b99001f221e8e910a14fae Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 23 Aug 2007 11:44:26 +0000 Subject: Move check for is_site_admin() to the top of the file, props Alexander Concha git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1042 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/wpmu-users.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'wp-admin') diff --git a/wp-admin/wpmu-users.php b/wp-admin/wpmu-users.php index 0c54eb8..fbcc086 100644 --- a/wp-admin/wpmu-users.php +++ b/wp-admin/wpmu-users.php @@ -4,6 +4,9 @@ $title = __('WPMU Admin: Users'); $parent_file = 'wpmu-admin.php'; $id = intval( $_REQUEST[ 'id' ] ); +if( is_site_admin() == false ) { + die( __('

You do not have permission to access this page.

') ); +} switch( $_REQUEST[ 'action' ] ) { case "confirm": @@ -22,9 +25,6 @@ switch( $_REQUEST[ 'action' ] ) { break; case "allusers": check_admin_referer('allusers'); - if( is_site_admin() == false ) { - die( __('

You do not have permission to access this page.

') ); - } if( is_array( $_POST[ 'allusers' ] ) ) { while( list( $key, $val ) = each( $_POST[ 'allusers' ] ) ) { if( $val != '' && $val != '0' && $val != '1' ) { @@ -51,9 +51,6 @@ switch( $_REQUEST[ 'action' ] ) { $title = __('WPMU Admin'); $parent_file = 'wpmu-admin.php'; require_once('admin-header.php'); -if( is_site_admin() == false ) { - die( __('

You do not have permission to access this page.

') ); -} if (isset($_GET['updated'])) { ?>