Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
This doesn't seems to be serious bug.
In the system chart submodule there is error in the query that will fetch the data that will display the number or users in particular role.
System_charts.module
case:users_per_role
$query = db_select('users_roles', 'ur');
$query->join('users', 'u', 'ur.uid = u.uid');
$query->join('role', 'r', 'r.rid = ur.uid');
$query->fields('r', array('rid', 'name'));
$query->addExpression('COUNT(*)', 'count');
$query->groupBy('r.rid');
$query->orderBy('r.name');
Above query only shows one user per role. I think this should be like this.
case:users_per_role
$query = db_select('users_roles', 'ur');
$query->join('role','r', 'r.rid = ur.rid');
$query->fields('r', array('rid', 'name'));
$query->groupBy('r.name');
$query->addExpression('COUNT(ur.uid)', 'count');
Comments
Comment #1
Pierre.Vriens CreditAttribution: Pierre.Vriens commentedAnybody who can confirm this bug? And the suggested fix?
Also, seems like there is a bug in "This doesn't seems to be serious bug.". Whatever it was intended to be, a bug is a bug, no? So let's try to fix it.