|
@@ -266,18 +266,16 @@ class Admin extends Apic
|
|
|
/**
|
|
|
* 删除
|
|
|
*/
|
|
|
- public function del($ids = "")
|
|
|
+ public function del()
|
|
|
{
|
|
|
- if (!$this->request->isPost()) {
|
|
|
- $this->error(__("Invalid parameters"));
|
|
|
- }
|
|
|
- $ids = $ids ? $ids : $this->request->post("ids");
|
|
|
+
|
|
|
+ $ids = input('ids','');
|
|
|
if ($ids) {
|
|
|
$ids = array_intersect($this->childrenAdminIds, array_filter(explode(',', $ids)));
|
|
|
// 避免越权删除管理员
|
|
|
$childrenGroupIds = $this->childrenGroupIds;
|
|
|
$adminList = $this->model->where('id', 'in', $ids)->where('id', 'in', function ($query) use ($childrenGroupIds) {
|
|
|
- $query->name('auth_group_access')->where('group_id', 'in', $childrenGroupIds)->field('uid');
|
|
|
+ $query->name('pc_auth_group_access')->where('group_id', 'in', $childrenGroupIds)->field('uid');
|
|
|
})->select();
|
|
|
if ($adminList) {
|
|
|
$deleteIds = [];
|