X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..dc1231b7312fbdca99e9e887cc2bb35a28f85cdc:/wp-admin/network/user-new.php diff --git a/wp-admin/network/user-new.php b/wp-admin/network/user-new.php index 5c671403..775e754b 100644 --- a/wp-admin/network/user-new.php +++ b/wp-admin/network/user-new.php @@ -26,14 +26,15 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __('Documentation on Network Users') . '

' . + '

' . __('Documentation on Network Users') . '

' . '

' . __('Support Forums') . '

' ); if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) { check_admin_referer( 'add-user', '_wpnonce_add-user' ); + if ( ! current_user_can( 'manage_network_users' ) ) - wp_die( __( 'You do not have permission to access this page.' ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); if ( ! is_array( $_POST['user'] ) ) wp_die( __( 'Cannot create an empty user.' ) ); @@ -50,7 +51,7 @@ if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) { if ( ! $user_id ) { $add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) ); } else { - wp_new_user_notification( $user_id, $password ); + wp_new_user_notification( $user_id, null, 'both' ); wp_redirect( add_query_arg( array('update' => 'added'), 'user-new.php' ) ); exit; } @@ -69,11 +70,11 @@ $parent_file = 'users.php'; require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

+

' . $msg . '

'; + echo '

' . $msg . '

'; } if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) { ?> @@ -84,18 +85,18 @@ if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) { ?> ?> -
+ - - + + - - + + - +