修复不能批量删除会员问题

Signed-off-by: 小和 <496631085@qq.com>
pull/480/head
小和 2024-11-22 01:32:46 +00:00 committed by Gitee
parent 17931decd5
commit 9ca5372393
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 8 additions and 5 deletions

View File

@ -93,12 +93,15 @@ class User extends Backend
$this->error(__("Invalid parameters")); $this->error(__("Invalid parameters"));
} }
$ids = $ids ? $ids : $this->request->post("ids"); $ids = $ids ? $ids : $this->request->post("ids");
$row = $this->model->get($ids); $idArray = explode(',', $ids);
$this->modelValidate = true; foreach ($idArray as $id) {
if (!$row) { $row = $this->model->get($id);
$this->error(__('No Results were found')); $this->modelValidate = true;
if (!$row) {
$this->error(__('No Results were found'));
}
Auth::instance()->delete($row['id']);
} }
Auth::instance()->delete($row['id']);
$this->success(); $this->success();
} }