Remove redundant current_user_can() check. props jeremyfelt. fixes #26057.

git-svn-id: https://develop.svn.wordpress.org/trunk@26236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-11-16 17:37:26 +00:00
parent 2e52eeb484
commit 0262b2e4db
1 changed files with 1 additions and 3 deletions

View File

@ -33,11 +33,9 @@ get_current_screen()->set_help_sidebar(
if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
check_admin_referer( 'add-blog', '_wpnonce_add-blog' );
if ( ! current_user_can( 'manage_sites' ) )
wp_die( __( 'You do not have permission to access this page.' ) );
if ( ! is_array( $_POST['blog'] ) )
wp_die( __( 'Can’t create an empty site.' ) );
$blog = $_POST['blog'];
$domain = '';
if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )