Make WordPress Core

Opened 13 years ago

Last modified 5 years ago

#18499 new defect (bug)

User count / roles inconsistency if roles no longer exist but users still do

Reported by: anmari's profile anmari Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Users Keywords: needs-patch
Focuses: ui, administration Cc:

Description

The count_users logic (from line 833 onwards in wp-includes/user.php) is based on user roles.

If the roles were created by a theme or plugin which is then deactivated, wordpress loses count of the users, but still lists them. The behaviour is confusing and inconsistent. See attached screenshot.

1) the user count total at the top (all) ignores the users with no 'active' role, however users are all listed (the users are shown as 'no role' in the list)

2) the old roles are shown in the dropdown selection however are not listed in the totals

Suggestions:

1) the total user count should at the very least be correct wrt to the list.

2) Perhaps a total of 'no role' users could/should be shown (since the users are listed anyway ?)

3) If the old roles are shown in the dropdown, perhaps they should be flagged as inactive in some way?

Attachments (1)

notenoughusers.png (214.1 KB) - added by anmari 13 years ago.

Download all attachments as: .zip

Change History (5)

#3 @chriscct7
10 years ago

  • Focuses ui administration added
  • Keywords needs-patch added

Loosely related #17924

#4 @chriscct7
9 years ago

  • Severity changed from minor to normal
Note: See TracTickets for help on using tickets.