简化代码

pull/501/head
ken678 2025-07-18 14:42:04 +08:00
parent 87acccfdf2
commit f804c8a460
1 changed files with 1 additions and 4 deletions

View File

@ -348,10 +348,7 @@ class Auth extends \fast\Auth
$obj = Tree::instance()->init($childrenList, 'pid')->getTreeArray($v['pid']);
$objList = array_merge($objList, Tree::instance()->getTreeList($obj));
}
$childrenGroupIds = [];
foreach ($objList as $k => $v) {
$childrenGroupIds[] = $v['id'];
}
$childrenGroupIds = array_column($objList, 'id');
if (!$withself) {
$childrenGroupIds = array_diff($childrenGroupIds, $groupIds);
}