SMF Support > SMF 2.0.x Support
Show all groups and count users in all groups
Pyrhel:
Mmm, the SSI is not needed. I will modify the fetching and remove the check if the user that requests the information is/not administrator. The default behaviour is that the admin can see all the members in a group, but normal users can see only members which primary group is the selected one :)
I can't find there is the fetching for the following data:
Arantor:
The query for that is in Sources/Groups.php, and it's a complicated mess due to how SMF handles groups.
Pyrhel:
That's EXACTLY what i was looking for. Thank you. The change was trivial, a "where" clause have to be changed:
$where = $context['group']['is_post_group'] ? 'id_post_group = {int:group}' : 'id_group = {int:group}';
to:
$where = $context['group']['is_post_group'] ? 'id_post_group = {int:group}' : 'id_group = {int:group} OR FIND_IN_SET({int:group}, additional_groups) != 0';
Navigation
[0] Message Index
[*] Previous page
Go to full version