Ticket #38804: 38804.patch
| File 38804.patch, 2.5 KB (added by , 10 years ago) |
|---|
-
wp-admin/users.php
94 94 check_admin_referer('bulk-users'); 95 95 96 96 if ( ! current_user_can( 'promote_users' ) ) 97 wp_die( __( ' You can’tedit that user.' ) );97 wp_die( __( 'Sorry, you are not allowed to edit that user.' ) ); 98 98 99 99 if ( empty($_REQUEST['users']) ) { 100 100 wp_redirect($redirect); … … 110 110 } 111 111 112 112 if ( ! $role || empty( $editable_roles[ $role ] ) ) { 113 wp_die( __( ' You can’tgive users that role.' ) );113 wp_die( __( 'Sorry, you are not allowed to give users that role.' ) ); 114 114 } 115 115 116 116 $userids = $_REQUEST['users']; … … 119 119 $id = (int) $id; 120 120 121 121 if ( ! current_user_can('promote_user', $id) ) 122 wp_die(__(' You can’tedit that user.'));122 wp_die(__('Sorry, you are not allowed to edit that user.')); 123 123 // The new role of the current user must also have the promote_users cap or be a multisite super admin 124 124 if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $role ]->has_cap('promote_users') 125 125 && ! ( is_multisite() && is_super_admin() ) ) { … … 164 164 } 165 165 166 166 if ( ! current_user_can( 'delete_users' ) ) 167 wp_die(__(' You can’tdelete users.'));167 wp_die(__('Sorry, you are not allowed to delete users.')); 168 168 169 169 $update = 'del'; 170 170 $delete_count = 0; … … 171 171 172 172 foreach ( $userids as $id ) { 173 173 if ( ! current_user_can( 'delete_user', $id ) ) 174 wp_die(__( ' You can’tdelete that user.' ) );174 wp_die(__( 'Sorry, you are not allowed to delete that user.' ) ); 175 175 176 176 if ( $id == $current_user->ID ) { 177 177 $update = 'err_admin_del'; … … 204 204 } 205 205 206 206 if ( ! current_user_can( 'delete_users' ) ) 207 $errors = new WP_Error( 'edit_users', __( ' You can’tdelete users.' ) );207 $errors = new WP_Error( 'edit_users', __( 'Sorry, you are not allowed to delete users.' ) ); 208 208 209 209 if ( empty($_REQUEST['users']) ) 210 210 $userids = array( intval( $_REQUEST['user'] ) ); … … 314 314 } 315 315 316 316 if ( ! current_user_can( 'remove_users' ) ) 317 wp_die( __( ' You can’tremove users.' ) );317 wp_die( __( 'Sorry, you are not allowed to remove users.' ) ); 318 318 319 319 $userids = $_REQUEST['users']; 320 320 … … 349 349 } 350 350 351 351 if ( !current_user_can('remove_users') ) 352 $error = new WP_Error('edit_users', __(' You can’tremove users.'));352 $error = new WP_Error('edit_users', __('Sorry, you are not allowed to remove users.')); 353 353 354 354 if ( empty($_REQUEST['users']) ) 355 355 $userids = array(intval($_REQUEST['user']));
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)