require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'list_users' ) )
- wp_die( __( 'Cheatin’ uh?' ) );
+ wp_die( __( 'Cheatin’ uh?' ), 403 );
$wp_list_table = _get_list_table('WP_Users_List_Table');
$pagenum = $wp_list_table->get_pagenum();
// If the user doesn't already belong to the blog, bail.
if ( is_multisite() && !is_user_member_of_blog( $id ) )
- wp_die(__('Cheatin’ uh?'));
+ wp_die( __( 'Cheatin’ uh?' ), 403 );
$user = get_userdata( $id );
$user->set_role($_REQUEST['new_role']);
wp_redirect(add_query_arg('update', $update, $redirect));
exit();
-break;
-
case 'dodelete':
if ( is_multisite() )
wp_die( __('User deletion is not allowed from this screen.') );
wp_redirect($redirect);
exit();
-break;
-
case 'delete':
if ( is_multisite() )
wp_die( __('User deletion is not allowed from this screen.') );
<?php echo '<label for="delete_option1">' . __( 'Attribute all content to:' ) . '</label> ';
wp_dropdown_users( array( 'name' => 'reassign_user', 'exclude' => array_diff( $userids, array($current_user->ID) ) ) ); ?></li>
</ul></fieldset>
+ <?php
+ /**
+ * Fires at the end of the delete users form prior to the confirm button.
+ *
+ * @since 4.0.0
+ *
+ * @param WP_User $current_user WP_User object for the user being deleted.
+ */
+ do_action( 'delete_user_form', $current_user );
+ ?>
<input type="hidden" name="action" value="dodelete" />
<?php submit_button( __('Confirm Deletion'), 'secondary' ); ?>
<?php else : ?>
wp_redirect($redirect);
exit;
-break;
-
case 'remove':
check_admin_referer('bulk-users');
}
}
?>
+</ul>
<?php if ( $go_remove ) : ?>
<input type="hidden" name="action" value="doremove" />
<?php submit_button( __('Confirm Removal'), 'secondary' ); ?>