[wp-trac] [WordPress Trac] #47936: Users can only be deleted when the current user is selected.
WordPress Trac
noreply at wordpress.org
Sun Aug 25 18:55:53 UTC 2019
#47936: Users can only be deleted when the current user is selected.
--------------------------+-----------------------------
Reporter: kbrownkd | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------------
Steps to reproduce:
1. Attempt to delete 1 or more users. Do not select the current user.
2. 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
3. Go back to the user deletion page.
4. 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
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47936>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list