Skip to content

Commit ce4fc1b

Browse files
committed
Fix: Users can now be deleted from wp-admin user table
1 parent b896a7d commit ce4fc1b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

includes/wpum-admin/class-wpum-user-table.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function bulk_fields_dropdown( $which ) {
7070
public function load_users() {
7171
add_action( 'restrict_manage_users',[ $this, 'bulk_fields_dropdown' ], 5 );
7272

73-
if ( ! isset( $_GET['update'] ) ) {
73+
if ( ! isset( $_GET['update'] ) || ! isset( $_GET['name'] ) ) {
7474
return;
7575
}
7676

@@ -91,6 +91,10 @@ public function load_users_role_bulk_add() {
9191
return;
9292
}
9393

94+
if ( empty( $_REQUEST['wpum-add-role-top'] ) && empty( $_REQUEST['wpum-add-role-bottom'] ) ) {
95+
return;
96+
}
97+
9498
check_admin_referer( 'wpum-bulk-users', 'wpum-bulk-users-nonce' );
9599

96100
if ( ! current_user_can( 'promote_users' ) ) {
@@ -145,6 +149,10 @@ public function load_users_role_bulk_remove() {
145149
return;
146150
}
147151

152+
if ( empty( $_REQUEST['wpum-remove-role-top'] ) && empty( $_REQUEST['wpum-remove-role-bottom'] ) ) {
153+
return;
154+
}
155+
148156
check_admin_referer( 'wpum-bulk-users', 'wpum-bulk-users-nonce' );
149157

150158
if ( ! current_user_can( 'promote_users' ) ) {

0 commit comments

Comments
 (0)