Changeset 33884
- Timestamp:
- 09/03/2015 08:44:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-new.php
r33774 r33884 11 11 12 12 if ( is_multisite() ) { 13 if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) 14 wp_die( __( 'Cheatin’ uh?' ), 403 ); 13 if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) { 14 wp_die( 15 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 16 '<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>', 17 403 18 ); 19 } 15 20 } elseif ( ! current_user_can( 'create_users' ) ) { 16 wp_die( __( 'Cheatin’ uh?' ), 403 ); 21 wp_die( 22 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 23 '<p>' . __( 'You are not allowed to create users.' ) . '</p>', 24 403 25 ); 17 26 } 18 27 … … 60 69 } 61 70 62 if ( ! current_user_can('promote_user', $user_details->ID) ) 63 wp_die( __( 'Cheatin’ uh?' ), 403 ); 71 if ( ! current_user_can( 'promote_user', $user_details->ID ) ) { 72 wp_die( 73 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 74 '<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>', 75 403 76 ); 77 } 64 78 65 79 // Adding an existing user to this blog … … 109 123 check_admin_referer( 'create-user', '_wpnonce_create-user' ); 110 124 111 if ( ! current_user_can('create_users') ) 112 wp_die( __( 'Cheatin’ uh?' ), 403 ); 125 if ( ! current_user_can( 'create_users' ) ) { 126 wp_die( 127 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 128 '<p>' . __( 'You are not allowed to create users.' ) . '</p>', 129 403 130 ); 131 } 113 132 114 133 if ( ! is_multisite() ) {
Note: See TracChangeset
for help on using the changeset viewer.