Opened 6 years ago
Closed 6 years ago
#47936 closed defect (bug) (fixed)
Users can only be deleted when the current user is selected.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.3 | Priority: | normal |
| Severity: | normal | Version: | 5.3 |
| Component: | Users | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Steps to reproduce:
- Attempt to delete 1 or more users. Do not select the current user.
- The Delete Users page displays:
You have specified these users for deletion:
There are no valid users selected for deletion.
With debugging enabled, the following warnings are displayed:
Notice: Undefined variable: all_userids in wp-admin/users.php on line 279
Warning: count(): Parameter must be an array or an object that implements Countable in wp-admin/users.php on line 279
Notice: Undefined variable: all_userids in wp-admin/users.php on line 288
Warning: Invalid argument supplied for foreach() in wp-admin/users.php on line 288
- Go back to the user deletion page.
- Select the current user and at least one other user for deletion and attempt to delete them. Observe that the deletion of the selected users proceeds as expected and without warnings.
This bug occurs because the variable $all_userids is declared only when the current user is selected for deletion. See lines 237 and 238 in wp-admin/users.php
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Hi @kbrownkd, welcome to WordPress Trac! Thanks for the ticket.
Good catch! Introduced in [45806].