Ticket #33678: 33678.diff
| File 33678.diff, 2.0 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/user-new.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 if ( is_multisite() ){13 if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) )14 wp_die( __( 'Cheatin’ uh?' ), 403 );15 } elseif ( ! current_user_can( 'create_users' ) ) { 16 wp_die( __( 'Cheatin’ uh?' ),403 );12 if ( ! current_user_can( 'create_users' ) ){ 13 wp_die( 14 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 15 '<p>' . __( 'You are not allowed to add this item.' ) . '</p>', 16 403 ); 17 17 } 18 18 19 if ( is_multisite() && ! current_user_can( 'promote_users' ) { 20 wp_die( 21 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 22 '<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>', 23 403 ); 24 } 25 19 26 if ( is_multisite() ) { 20 27 /** 21 28 * … … 59 66 die(); 60 67 } 61 68 62 if ( ! current_user_can('promote_user', $user_details->ID) ) 63 wp_die( __( 'Cheatin’ uh?' ), 403 ); 69 if ( ! current_user_can('promote_user', $user_details->ID) ) { 70 wp_die( 71 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 72 '<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>', 73 403 ); 74 } 64 75 65 76 // Adding an existing user to this blog 66 77 $new_user_email = $user_details->user_email; … … 108 119 } elseif ( isset($_REQUEST['action']) && 'createuser' == $_REQUEST['action'] ) { 109 120 check_admin_referer( 'create-user', '_wpnonce_create-user' ); 110 121 111 if ( ! current_user_can('create_users') ) 112 wp_die( __( 'Cheatin’ uh?' ), 403 ); 122 if ( ! current_user_can('create_users') ) { 123 wp_die( 124 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 125 '<p>' . __( 'You are not allowed to add this item.' ) . '</p>', 126 403 ); 127 } 113 128 114 129 if ( ! is_multisite() ) { 115 130 $user_id = edit_user();
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)