mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Don't maintain a membership for the 'all' group when it includes everyone. Just return it for everyone if the 'all' group is requested. For the count of the 'all' group, just return a count of all the users on the system. Fixes #613
This commit is contained in:
parent
1295e7691a
commit
b0c231e4f3
@ -417,6 +417,9 @@ function local_user_get_groups($user, $all = false) {
|
||||
if (in_array($user['uid'], $group['member']))
|
||||
$groups[] = $group['name'];
|
||||
|
||||
if ( $all )
|
||||
$groups[] = "all";
|
||||
|
||||
sort($groups);
|
||||
|
||||
return $groups;
|
||||
|
||||
@ -412,6 +412,9 @@ function presubmit() {
|
||||
$grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group-grey.png";
|
||||
else
|
||||
$grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group.png";
|
||||
$groupcount = count($group['member']);
|
||||
if ($group["name"] == "all")
|
||||
$groupcount = count($config['system']['user']);
|
||||
?>
|
||||
<tr ondblclick="document.location='system_groupmanager.php?act=edit&id=<?=$i;?>'">
|
||||
<td class="listlr">
|
||||
@ -431,7 +434,7 @@ function presubmit() {
|
||||
<?=htmlspecialchars($group['description']);?>
|
||||
</td>
|
||||
<td class="listbg">
|
||||
<?=count($group['member'])?>
|
||||
<?=$groupcount;?>
|
||||
</td>
|
||||
<td valign="middle" nowrap class="list">
|
||||
<a href="system_groupmanager.php?act=edit&id=<?=$i;?>">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user